Creative: Make the placenode registration check for non-player placers
This commit is contained in:
parent
319b9eeeaf
commit
8b5ad0f028
|
@ -47,7 +47,9 @@ end
|
||||||
|
|
||||||
-- Unlimited node placement
|
-- Unlimited node placement
|
||||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
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)
|
end)
|
||||||
|
|
||||||
-- Don't pick up if the item is already in the inventory
|
-- Don't pick up if the item is already in the inventory
|
||||||
|
|
Loading…
Reference in New Issue