diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index fae2eac766..4ce94c01bc 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -158,6 +158,10 @@ function mcl_beds.skip_thunderstorm() end 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 local _, dim = mcl_util.y_to_layer(pos.y) if dim == "nether" or dim == "end" then