From ca3e807d3538a5870e461e0abd428146e2db7e1d Mon Sep 17 00:00:00 2001 From: raymoo Date: Sun, 1 Oct 2017 18:32:01 -0700 Subject: [PATCH] Creative: Make the placenode registration check for non-player placers --- mods/creative/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/creative/init.lua b/mods/creative/init.lua index a33475dd..2a590e34 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -40,7 +40,9 @@ end -- Unlimited node placement minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) - return creative.is_enabled_for(placer:get_player_name()) + if placer and placer:is_player() then + return creative.is_enabled_for(placer:get_player_name()) + end end) -- Don't pick up if the item is already in the inventory -- 2.25.1