Skip to content
Snippets Groups Projects
Commit 4f32fd25 authored by Auke Kok's avatar Auke Kok Committed by Auke Kok
Browse files

Fix ItemStack method call for keys.

Fixes (I hope) #1420 (bad method call).
parent 0196c479
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment