Beds: minor update

This commit is contained in:
MoNTE48 2020-12-25 15:54:48 +01:00
parent 40717d3f7e
commit b5bc00a8b8
2 changed files with 2 additions and 5 deletions

View File

@ -80,9 +80,7 @@ function beds.register_bed(name, def)
minetest.set_node(pos, {name = itemstack:get_name(), param2 = dir})
minetest.sound_play({name = "default_place_node_hard"}, {pos = pos})
if not (creative and creative.is_enabled_for
and creative.is_enabled_for(player_name)) or
not minetest.is_singleplayer() then
if not minetest.is_creative_enabled(player_name) then
itemstack:take_item()
end
return itemstack

View File

@ -13,8 +13,7 @@ function beds.dyeing(pos, _, clicker, itemstack)
param2 = minetest.get_node(pos).param2
})
if not (creative and creative.is_enabled_for and
creative.is_enabled_for(player_name)) then
if not minetest.is_creative_enabled(player_name) then
itemstack:take_item()
end