added simple protection check

master
Juraj Vajda 2018-02-24 15:52:46 -05:00
parent dc7ee11594
commit 99b721d4a0
1 changed files with 9 additions and 0 deletions

View File

@ -191,3 +191,12 @@ function pvp_block.register_on_punchplayer(player, hitter, time_from_last_punch,
end
minetest.register_on_punchplayer(pvp_block.register_on_punchplayer)
-- protection
local old_is_protected = minetest.is_protected
function minetest.is_protected(pos, name)
if pvp_block:in_area(pos) then
return true
end
return old_is_protected(pos, name)
end