owner check

This commit is contained in:
Thomas Rudin 2018-10-15 20:24:05 +02:00
parent 5ab0b6383a
commit 26474b3f5c

View File

@ -304,7 +304,7 @@ function technic.chests:definition(name, data)
def.can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
return inv:is_empty("main") and default.can_interact_with_node(player, pos)
return inv:is_empty("main") and player and player:is_player() and default.can_interact_with_node(player, pos)
end
def.on_skeleton_key_use = function(pos, player, newsecret)
local meta = minetest.get_meta(pos)