Advertisement
Guest User

Untitled

a guest
May 24th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. core.register_chatcommand("update", {
  2.         params = "<node> [<X>,<Y>,<Z>]",
  3.         description = "Add node <node> at (<X>, <Y>, <Z>)",
  4.         privs = {},
  5.         func = function(name, param)
  6.                 local node, p = string.match(param, "^([^ ]+) *(.*)$")
  7.                 p = minetest.string_to_pos(p)
  8.                 if p == nil then
  9.                        return false, "Invalid parameters ('" .. param .. "')"
  10.                 end
  11.                 minetest.set_node(p, {name = node})
  12.         end,
  13. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement