Allow non-players to dig locked chests.

This commit is contained in:
MT-Modder 2016-02-25 18:12:49 -05:00 committed by paramat
parent 0410b5e0ca
commit ac843f8fe7

View File

@ -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