1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 04:40:22 +02:00

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:
Auke Kok
2016-01-20 14:29:48 +00:00
committed by paramat
parent f8f7502e32
commit 2fb40be409
3 changed files with 7 additions and 4 deletions

View File

@ -5,7 +5,7 @@ bones = {}
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