Don't take sapling in creative mode

This commit is contained in:
Wuzzy 2019-09-04 16:10:31 +02:00
parent 68782753ce
commit c354424a7d

View File

@ -48,7 +48,9 @@ function default.place_sapling(itemstack, placer, pointed_thing)
minetest.set_node(pointed_thing.above, {name = itemstack:get_name()})
itemstack:take_item()
if not minetest.settings:get_bool("creative_mode") then
itemstack:take_item()
end
return itemstack
end