forked from minetest/minetest_game
Fix ItemStack method call for keys.
Fixes (I hope) #1420 (bad method call).
This commit is contained in:
parent
0196c4793a
commit
4f32fd253c
@ -1630,7 +1630,7 @@ local function has_locked_chest_privilege(meta, player)
|
||||
-- is player wielding the right key?
|
||||
local item = player:get_wielded_item()
|
||||
if item:get_name() == "default:key" then
|
||||
local key_meta = minetest.parse_json(item.get_metadata())
|
||||
local key_meta = minetest.parse_json(item:get_metadata())
|
||||
local secret = meta:get_string("key_lock_secret")
|
||||
if secret ~= key_meta.secret then
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user