better creative mode checks, fix crash when digging walls in MCL

This commit is contained in:
FaceDeer
2022-08-24 20:41:24 -06:00
parent 464f0f161b
commit 0cd2c9590f
9 changed files with 22 additions and 8 deletions

View File

@ -167,7 +167,7 @@ local place_seed = function(itemstack, placer, pointed_thing, plantname)
end
end
if not minetest.settings:get_bool("creative_mode", false) then
if not minetest.is_creative_enabled(placer:get_player_name()) then
itemstack:take_item()
end
return itemstack

View File

@ -77,7 +77,7 @@ local plump_helmet_on_place = function(itemstack, placer, pointed_thing, plantn
end
end
if not minetest.settings:get_bool("creative_mode", false) then
if not minetest.is_creative_enabled(placer:get_player_name()) then
itemstack:take_item()
end
return itemstack