Contents
Class WorldSomnolence
java.lang.Object
com.hypixel.hytale.builtin.beds.sleep.resources.WorldSomnolence
- All Implemented Interfaces:
Resource<EntityStore>, Cloneable
A resource that represents the sleep state of a world.
-
Field Summary
Fields inherited from interface Resource
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static ResourceType<EntityStore, WorldSomnolence> getState()voidvoidsetState(WorldSleep state) Called to set the current sleep state of the world.booleanuseSleepNotificationCooldown(long now, long cooldownMs)
-
Constructor Details
-
WorldSomnolence
public WorldSomnolence()
-
-
Method Details
-
getResourceType
- Returns:
- the resource type for the
WorldSomnolenceresource.
-
getState
- Returns:
- the current sleep state of the world.
-
setState
Called to set the current sleep state of the world.- Parameters:
state- The new sleep state of the world.
-
useSleepNotificationCooldown
public boolean useSleepNotificationCooldown(long now, long cooldownMs) -
resetNotificationCooldown
public void resetNotificationCooldown() -
clone
- Specified by:
clonein interfaceResource<EntityStore>- Returns:
- a clone instance of the original resource instance.
-