Skip to content

Commit

Permalink
Fix ItemStack method call for keys.
Browse files Browse the repository at this point in the history
Fixes (I hope) #1420 (bad method call).
  • Loading branch information
sofar committed Nov 28, 2016
1 parent 0196c47 commit 4f32fd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mods/default/nodes.lua
Expand Up @@ -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
Expand Down

0 comments on commit 4f32fd2

Please sign in to comment.