From a634fa54362bf0d64a4f8a1eebbf6f3f2974b9f1 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Fri, 26 Apr 2024 17:28:29 -0400 Subject: [PATCH] mod - firefly - fix wrong check for object on place --- mods/fireflies/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/fireflies/init.lua b/mods/fireflies/init.lua index c3c086c..8107c79 100644 --- a/mods/fireflies/init.lua +++ b/mods/fireflies/init.lua @@ -38,8 +38,9 @@ minetest.register_node("fireflies:firefly", { light_source = 6, floodable = true, on_place = function(itemstack, placer, pointed_thing) - if not player and not player:is_player() then return itemstack end - local player_name = placer:get_player_name() + if not placer then return itemstack end + if not placer:is_player() then return itemstack end + local player_name = placer:get_player_name() or "" local pos = pointed_thing.above if not minetest.is_protected(pos, player_name) and