Record Class NetherStatus
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.nether.NetherStatus
public record NetherStatus(boolean configured, NetherPreparationState preparationState, boolean accessEnabled, Optional<String> worldName, boolean worldLoaded, Optional<Boolean> pvpEnabled, Optional<WorldBorderSnapshot> border)
extends Record
Immutable status snapshot for one runtime game's Nether.
-
Constructor Summary
ConstructorsConstructorDescriptionNetherStatus(boolean configured, NetherPreparationState preparationState, boolean accessEnabled, Optional<String> worldName, boolean worldLoaded, Optional<Boolean> pvpEnabled, Optional<WorldBorderSnapshot> border) Creates an instance of aNetherStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theaccessEnabledrecord component.border()Returns the value of theborderrecord component.booleanReturns the value of theconfiguredrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanReturns the value of thepreparationStaterecord component.Returns the value of thepvpEnabledrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theworldLoadedrecord component.Returns the value of theworldNamerecord component.
-
Constructor Details
-
NetherStatus
public NetherStatus(boolean configured, NetherPreparationState preparationState, boolean accessEnabled, Optional<String> worldName, boolean worldLoaded, Optional<Boolean> pvpEnabled, Optional<WorldBorderSnapshot> border) Creates an instance of aNetherStatusrecord class.- Parameters:
configured- the value for theconfiguredrecord componentpreparationState- the value for thepreparationStaterecord componentaccessEnabled- the value for theaccessEnabledrecord componentworldName- the value for theworldNamerecord componentworldLoaded- the value for theworldLoadedrecord componentpvpEnabled- the value for thepvpEnabledrecord componentborder- the value for theborderrecord component
-
-
Method Details
-
isPreparing
public boolean isPreparing() -
isPrepared
public boolean isPrepared() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
configured
public boolean configured()Returns the value of theconfiguredrecord component.- Returns:
- the value of the
configuredrecord component
-
preparationState
Returns the value of thepreparationStaterecord component.- Returns:
- the value of the
preparationStaterecord component
-
accessEnabled
public boolean accessEnabled()Returns the value of theaccessEnabledrecord component.- Returns:
- the value of the
accessEnabledrecord component
-
worldName
Returns the value of theworldNamerecord component.- Returns:
- the value of the
worldNamerecord component
-
worldLoaded
public boolean worldLoaded()Returns the value of theworldLoadedrecord component.- Returns:
- the value of the
worldLoadedrecord component
-
pvpEnabled
Returns the value of thepvpEnabledrecord component.- Returns:
- the value of the
pvpEnabledrecord component
-
border
Returns the value of theborderrecord component.- Returns:
- the value of the
borderrecord component
-