Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- core.register_chatcommand("update", {
- params = "<node> [<X>,<Y>,<Z>]",
- description = "Add node <node> at (<X>, <Y>, <Z>)",
- privs = {},
- func = function(name, param)
- local node, p = string.match(param, "^([^ ]+) *(.*)$")
- p = minetest.string_to_pos(p)
- if p == nil then
- return false, "Invalid parameters ('" .. param .. "')"
- end
- minetest.set_node(p, {name = node})
- end,
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement