Permalink
Browse files

Creative: Make the placenode registration check for non-player placers

  • Loading branch information...
raymoo authored and paramat committed Oct 2, 2017
1 parent 319b9ee commit 8b5ad0f02813cefada44d93d31b2556d8277b5bf
Showing with 3 additions and 1 deletion.
  1. +3 −1 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

0 comments on commit 8b5ad0f

Please sign in to comment.