mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-03-15 12:21:24 +00:00
Allow non-players to dig locked chests.
This commit is contained in:
parent
0410b5e0ca
commit
ac843f8fe7
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue