package com.hypixel.hytale.builtin.beds.sleep.components; import com.hypixel.hytale.builtin.beds.BedsPlugin; import com.hypixel.hytale.component.Component; import com.hypixel.hytale.component.ComponentType; import com.hypixel.hytale.server.core.universe.world.storage.EntityStore; import org.checkerframework.checker.nullness.compatqual.NullableDecl; public class PlayerSomnolence implements Component { public static PlayerSomnolence AWAKE = new PlayerSomnolence(PlayerSleep.FullyAwake.INSTANCE); private PlayerSleep state = PlayerSleep.FullyAwake.INSTANCE; public static ComponentType getComponentType() { return BedsPlugin.getInstance().getPlayerSomnolenceComponentType(); } public PlayerSomnolence() { } public PlayerSomnolence(PlayerSleep state) { this.state = state; } public PlayerSleep getSleepState() { return this.state; } @NullableDecl @Override public Component clone() { PlayerSomnolence clone = new PlayerSomnolence(); clone.state = this.state; return clone; } }