Contents
Class CanSleepInWorld
java.lang.Object
com.hypixel.hytale.builtin.beds.sleep.systems.world.CanSleepInWorld
A utility class that checks if sleeping is allowed in the given world.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA record representing a negative result indicating that the current time is not within the allowed sleep hours range.static interfaceAn interface representing the result of a sleep check.static enumAn enum representing the positive and certain negative results of a sleep check. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CanSleepInWorld.ResultChecks if sleeping is allowed in the given world.
-
Constructor Details
-
CanSleepInWorld
public CanSleepInWorld()
-
-
Method Details
-
check
Checks if sleeping is allowed in the given world.- Parameters:
world- The world to check.- Returns:
- a
CanSleepInWorld.Resultindicating whether sleeping is allowed or not.
-