1
0
Fork 0

Don't allow to use bed while sleeping

objects
Wuzzy 2017-11-21 20:23:34 +01:00
parent a575124924
commit 7920707ca4
1 changed files with 4 additions and 0 deletions

View File

@ -158,6 +158,10 @@ function mcl_beds.skip_thunderstorm()
end end
function mcl_beds.on_rightclick(pos, player) function mcl_beds.on_rightclick(pos, player)
-- Anti-Inception: Don't allow to sleep while you're sleeping
if player:get_attribute("mcl_beds:sleeping") == "true" then
return
end
if minetest.get_modpath("mcl_init") then if minetest.get_modpath("mcl_init") then
local _, dim = mcl_util.y_to_layer(pos.y) local _, dim = mcl_util.y_to_layer(pos.y)
if dim == "nether" or dim == "end" then if dim == "nether" or dim == "end" then