added protector mod compatibility

This commit is contained in:
Alexsandro Percy 2021-05-22 20:00:58 -03:00
parent e9a73ef3c1
commit 8361282240
1 changed files with 14 additions and 2 deletions

View File

@ -49,7 +49,7 @@ minetest.register_tool("airutils:tug", {
local pos = player:get_pos()
local pname = player:get_player_name()
if areas then
--[[if areas then
if not areas:canInteract(pos, pname) then
local owners = areas:getNodeOwners(pos)
minetest.chat_send_player(pname,
@ -59,7 +59,19 @@ minetest.register_tool("airutils:tug", {
else
airutils.move_target(player, pointed_thing)
end
else
end]]--
local is_protected = minetest.is_protected
if is_protected then
if not is_protected(pos, pname) then
airutils.move_target(player, pointed_thing)
else
minetest.chat_send_player(pname,
S("@1 is protected.",
minetest.pos_to_string(pos)))
end
end
if not is_protected then
airutils.move_target(player, pointed_thing)
end