check for protection bypass permission

This commit is contained in:
FaceDeer 2017-02-04 23:07:40 -07:00
parent 58505e8d04
commit 039421453f

@ -305,7 +305,7 @@ minetest.register_node("hopper:hopper", {
end,
on_rightclick = function(pos, node, clicker, itemstack)
if minetest.is_protected(pos, clicker:get_player_name()) then
if minetest.is_protected(pos, clicker:get_player_name()) and not minetest.check_player_privs(clicker, "protection_bypass") then
return
end
minetest.show_formspec(clicker:get_player_name(),
@ -396,7 +396,7 @@ minetest.register_node("hopper:hopper_side", {
end,
on_rightclick = function(pos, node, clicker, itemstack)
if minetest.is_protected(pos, clicker:get_player_name()) then
if minetest.is_protected(pos, clicker:get_player_name()) and not minetest.check_player_privs(clicker, "protection_bypass") then
return
end
minetest.show_formspec(clicker:get_player_name(),
@ -487,7 +487,7 @@ minetest.register_node("hopper:chute", {
end,
on_rightclick = function(pos, node, clicker, itemstack)
if minetest.is_protected(pos, clicker:get_player_name()) then
if minetest.is_protected(pos, clicker:get_player_name()) and not minetest.check_player_privs(clicker, "protection_bypass") then
return
end
minetest.show_formspec(clicker:get_player_name(),