faction: protect can be bypassed now

This commit is contained in:
Coder12a
2019-06-28 15:49:42 -05:00
parent d00c120cd5
commit e962c88309
2 changed files with 12 additions and 8 deletions

View File

@ -1,6 +1,10 @@
local default_is_protected = minetest.is_protected
minetest.is_protected = function(pos, player)
if minetest.check_player_privs(player, "protection_bypass") then
return default_is_protected(pos, player)
end
local y = pos.y
if factions_config.protection_depth_height_limit and (pos.y < factions_config.protection_max_depth or pos.y > factions_config.protection_max_height) then