mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-10 09:07:30 +01:00
Players added to protector can punch to see protected area
This commit is contained in:
parent
afff918d98
commit
f02fe24b61
4
init.lua
4
init.lua
@ -331,7 +331,7 @@ minetest.register_node("protector:protect", {
|
|||||||
|
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
|
|
||||||
if not protector.can_dig(1, pos, puncher:get_player_name(), true, 1) then
|
if minetest.is_protected(pos, puncher:get_player_name()) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -412,7 +412,7 @@ minetest.register_node("protector:protect2", {
|
|||||||
|
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
|
|
||||||
if not protector.can_dig(1, pos, puncher:get_player_name(), true, 1) then
|
if minetest.is_protected(pos, puncher:get_player_name()) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user