Update init.lua

master
Don 2017-01-09 18:04:31 -08:00 committed by GitHub
parent f9947ae6ef
commit 1a1330ac44
1 changed files with 2 additions and 2 deletions

View File

@ -47,14 +47,14 @@ minetest.register_on_punchnode(function(pos, node, puncher)
local n = node
if puncher:get_wielded_item():get_name() == "myadmintools:ultimate_tool"
and minetest.get_node(pos).name ~= "air"
and minetest.get_player_privs(puncher:get_player_name()).myadmin_levels_super == true then
and minetest.get_player_privs(puncher:get_player_name()).myprivs_levels_super == true then
minetest.remove_node(pos)
end
if puncher:get_wielded_item():get_name() == "myadmintools:ultimate_tool"
or puncher:get_wielded_item():get_name() == "myadmintools:ultimate_tool_drop"
and minetest.get_node(pos).name ~= "air" then
if minetest.get_player_privs(puncher:get_player_name()).myadmin_levels_super ~= true then
if minetest.get_player_privs(puncher:get_player_name()).myprivs_levels_super ~= true then
minetest.chat_send_player(puncher:get_player_name(), "You don't have the priv for this tool")
puncher:set_wielded_item("default:stick")
minetest.set_node(pos,{name = node.name})