Detaching on day bug

master
donat 2014-08-19 22:37:01 +04:00 committed by BlockMen
parent ab7bc6a3a7
commit 9afb99c541
1 changed files with 3 additions and 0 deletions

View File

@ -134,6 +134,9 @@ function beds.on_rightclick(pos, player)
local tod = minetest.get_timeofday()
if tod > 0.2 and tod < 0.805 then
if beds.player[name] then
lay_down(player, nil, nil, false)
end
minetest.chat_send_player(name, "You can only sleep at night.")
return
end