Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Creative: Make the placenode registration check for non-player placers
  • Loading branch information
raymoo authored and paramat committed Nov 11, 2017
1 parent 319b9ee commit 8b5ad0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mods/creative/init.lua
Expand Up @@ -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
Expand Down

0 comments on commit 8b5ad0f

Please sign in to comment.