forked from minetest/minetest_game
Add "protection_bypass" priv.
The access privilege allows players that have it to bypass protection on locked doors/trapdoors, chests and bones. The priv also allows bypassing any minetest.is_protected() check, including digging nodes and placing them. It is meant for world moderators to clean up and fix map issues. Original patch by red-001. Split up and rebased/rewritten by sofar. This patch requires https://github.com/minetest/minetest/pull/3800
This commit is contained in:
@ -1414,6 +1414,9 @@ end
|
||||
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
|
||||
|
Reference in New Issue
Block a user