mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Don't allow to use bed while sleeping
This commit is contained in:
parent
a575124924
commit
7920707ca4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user