From: raymoo Date: Mon, 2 Oct 2017 01:32:01 +0000 (-0700) Subject: Creative: Make the placenode registration check for non-player placers X-Git-Tag: 0.4.17.1~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ca3e807d3538a5870e461e0abd428146e2db7e1d;p=oweals%2Fminetest_game.git Creative: Make the placenode registration check for non-player placers --- 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