Class WorldSomnolence

java.lang.Object
com.hypixel.hytale.builtin.beds.sleep.resources.WorldSomnolence
All Implemented Interfaces:
Resource<EntityStore>, Cloneable

public class WorldSomnolence extends Object implements Resource<EntityStore>
A resource that represents the sleep state of a world.
  • Constructor Details

    • WorldSomnolence

      public WorldSomnolence()
  • Method Details

    • getResourceType

      public static ResourceType<EntityStore, WorldSomnolence> getResourceType()
      Returns:
      the resource type for the WorldSomnolence resource.
    • getState

      @Nonnull public WorldSleep getState()
      Returns:
      the current sleep state of the world.
    • setState

      public void setState(@Nonnull WorldSleep state)
      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

      @Nullable public Resource<EntityStore> clone()
      Specified by:
      clone in interface Resource<EntityStore>
      Returns:
      a clone instance of the original resource instance.