forked from nalc/nalc_game
Allow non-players to dig locked chests.
This commit is contained in:
parent
0410b5e0ca
commit
ac843f8fe7
|
@ -1410,7 +1410,11 @@ local function get_locked_chest_formspec(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function has_locked_chest_privilege(meta, player)
|
local function has_locked_chest_privilege(meta, player)
|
||||||
if player:get_player_name() ~= meta:get_string("owner") then
|
local name = ""
|
||||||
|
if player then
|
||||||
|
name = player:get_player_name()
|
||||||
|
end
|
||||||
|
if name ~= meta:get_string("owner") then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user