screwdriver: Allow protection bypass

This commit is contained in:
tuedel 2020-06-28 16:30:10 +00:00
parent 12f75ab803
commit 6a0d67e30f

View file

@ -93,7 +93,8 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses)
local pos = pointed_thing.under local pos = pointed_thing.under
local player_name = user and user:get_player_name() or "" local player_name = user and user:get_player_name() or ""
if minetest.is_protected(pos, player_name) then if minetest.is_protected(pos, player_name) and
not minetest.check_player_privs(player_name, { protection_bypass = true }) then
minetest.record_protection_violation(pos, player_name) minetest.record_protection_violation(pos, player_name)
return return
end end