Merge pull request #13 from FozLand/access
Let ironbound chests obey protection_bypass priv
This commit is contained in:
commit
5772fbd80c
9
init.lua
9
init.lua
@ -225,7 +225,14 @@ function default.get_ironbound_chest_formspec(pos)
|
||||
end
|
||||
|
||||
local function has_ironbound_chest_privilege(meta, player)
|
||||
if player:get_player_name() ~= meta:get_string("owner") then
|
||||
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
|
||||
return false
|
||||
end
|
||||
return true
|
||||
|
Loading…
x
Reference in New Issue
Block a user