bugfix: use `player_in_bed` instead `check_in_beds()`

This commit is contained in:
nixnoxus 2024-04-21 22:26:29 +02:00
parent 539b7e6b1f
commit b3c8e03dbf
1 changed files with 2 additions and 2 deletions

View File

@ -424,7 +424,7 @@ function mcl_beds.on_rightclick(pos, player, is_top)
update_formspecs(false)
-- skip the night and let all players stand up
if check_in_beds() then
if player_in_bed > 0 then
minetest.after(5, recheck_in_beds)
end
end
@ -452,7 +452,7 @@ minetest.register_on_leaveplayer(function(player)
break
end
end
if check_in_beds(players) then
if player_in_bed > 0 then
minetest.after(5, recheck_in_beds)
end
update_formspecs(false, players)