Skip to content

Commit

Permalink
Allow non-players to dig locked chests.
Browse files Browse the repository at this point in the history
  • Loading branch information
MT-Modder authored and paramat committed Mar 3, 2016
1 parent 0410b5e commit ac843f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mods/default/nodes.lua
Expand Up @@ -1410,7 +1410,11 @@ local function get_locked_chest_formspec(pos)
end
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
end
return true
Expand Down

0 comments on commit ac843f8

Please sign in to comment.