it's possible for the player to be nil

in can_dig (e.g. if it's a technic quarry or something)
This commit is contained in:
Vanessa Ezekowitz 2017-02-22 17:28:48 -05:00
parent e8981367d6
commit 0eee5f4959

View File

@ -206,6 +206,7 @@ minetest.register_node("itemframes:pedestal",{
end
end,
can_dig = function(pos,player)
if not player then return end
local name = player and player:get_player_name()
local meta = minetest.get_meta(pos)
return name == meta:get_string("owner") or