From 8b5ad0f02813cefada44d93d31b2556d8277b5bf 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 09dc2dc7..ef190b8d 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -47,7 +47,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