local function is_owner(pos, name)
local owner = minetest.get_meta(pos):get_string("owner")
- if owner == "" or owner == name then
+ if owner == "" or owner == name or minetest.check_player_privs(placer, "protection_bypass") then
return true
end
return false
local function has_locked_chest_privilege(meta, player)
local name = ""
if player then
+ if minetest.check_player_privs(player, "protection_bypass") then
+ return true
+ end
name = player:get_player_name()
end
if name ~= meta:get_string("owner") then
local def = minetest.registered_nodes[minetest.get_node(pos).name]
local name = def.door.name
- if clicker then
+ if clicker and not minetest.check_player_privs(clicker, "protection_bypass") then
local owner = meta:get_string("doors_owner")
if owner ~= "" then
if clicker:get_player_name() ~= owner then
----trapdoor----
function _doors.trapdoor_toggle(pos, clicker)
- if clicker then
+ if clicker and not minetest.check_player_privs(clicker, "protection_bypass") then
local meta = minetest.get_meta(pos)
local owner = meta:get_string("doors_owner")
if owner ~= "" then
local name_opened = name.."_open"
local function check_player_priv(pos, player)
- if not def.protected then
+ if not def.protected or minetest.check_player_privs(player, "protection_bypass") then
return true
end
local meta = minetest.get_meta(pos)