mirror of
https://github.com/minetest-mods/hopper.git
synced 2024-12-22 05:12:29 +01:00
check for protection bypass permission
This commit is contained in:
parent
58505e8d04
commit
039421453f
6
init.lua
6
init.lua
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user