diff --git a/tool.lua b/tool.lua index 1fe7971..ca00d8a 100644 --- a/tool.lua +++ b/tool.lua @@ -54,6 +54,13 @@ minetest.register_craftitem("protector:tool", { pos.y = pos.y + vec.y pos.z = pos.z + vec.z + -- areas + if not areas:canInteract(pos, name) then + minetest.chat_send_player(name, "Overlaps into another player protected area") + + return + end + -- does placing a protector overlap existing area if not protector.can_dig(r * 2, pos, user:get_player_name(), true, 3) then