Contents
Record Class CanSleepInWorld.NotDuringSleepHoursRange
java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.beds.sleep.systems.world.CanSleepInWorld.NotDuringSleepHoursRange
- Record Components:
worldTime- The current world time.sleepConfig- The sleep configuration of the world.
- All Implemented Interfaces:
CanSleepInWorld.Result
- Enclosing class:
CanSleepInWorld
public static record CanSleepInWorld.NotDuringSleepHoursRange(LocalDateTime worldTime, SleepConfig sleepConfig)
extends Record
implements CanSleepInWorld.Result
A record representing a negative result indicating that the current time is not within the allowed sleep hours range.
-
Constructor Summary
ConstructorsConstructorDescriptionNotDuringSleepHoursRange(LocalDateTime worldTime, SleepConfig sleepConfig) Creates an instance of aNotDuringSleepHoursRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thesleepConfigrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworldTimerecord component.
-
Constructor Details
-
NotDuringSleepHoursRange
Creates an instance of aNotDuringSleepHoursRangerecord class.- Parameters:
worldTime- the value for theworldTimerecord componentsleepConfig- the value for thesleepConfigrecord component
-
-
Method Details
-
isNegative
public boolean isNegative()- Specified by:
isNegativein interfaceCanSleepInWorld.Result- Returns:
trueif the result indicates a negative outcome,falseotherwise.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
worldTime
-
sleepConfig
Returns the value of thesleepConfigrecord component.- Returns:
- the value of the
sleepConfigrecord component
-