Wrench: Allow picking up with protection_bypass privilege (#393)

This allows admins to move other players locked chests/etc without hassle (relocating flying chests).
This commit is contained in:
Fixer 2018-07-15 13:27:52 +03:00 committed by SmallJoker
parent 6664714313
commit 395089dfd8

@ -120,7 +120,7 @@ minetest.register_tool("wrench:wrench", {
return
end
local meta = minetest.get_meta(pos)
if def.owned then
if def.owned and not minetest.check_player_privs(placer, "protection_bypass") then
local owner = meta:get_string("owner")
if owner and owner ~= player_name then
minetest.log("action", player_name..