Fix creative node placement

This commit is contained in:
AFCMS 2023-08-23 21:48:49 +02:00
parent 149cb5d17c
commit 2eabeb119a
No known key found for this signature in database
GPG key ID: 8720389A25B652E3

View file

@ -725,6 +725,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
mcl_inventory.set_creative_formspec(player) mcl_inventory.set_creative_formspec(player)
end) end)
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
return placer and placer:is_player() and minetest.is_creative_enabled(placer:get_player_name())
end)
if minetest.is_creative_enabled("") then if minetest.is_creative_enabled("") then
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)