properly use minetest.is_protected(pos, *name*)

fixes https://github.com/pandorabox-io/pandorabox.io/issues/496
This commit is contained in:
BuckarooBanzay 2020-04-23 16:06:58 +02:00
parent 0517f803f2
commit 6c8b06e5ce

View File

@ -6,7 +6,7 @@ local S = mobs.intllib
minetest.override_item("mobs:beehive", {
on_dig = function(pos, node, digger)
if minetest.is_protected(pos, digger) then
if digger and minetest.is_protected(pos, digger:get_player_name()) then
return
end
local meta = minetest.get_meta(pos)