mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 00:19:32 +01:00
Don't allow to use bed while sleeping
This commit is contained in:
parent
a575124924
commit
7920707ca4
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue