Record Class NetherToggleRequest
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.nether.NetherToggleRequest
public record NetherToggleRequest(boolean enabled, Optional<Boolean> pvp, Optional<NetherBorderSettings> border)
extends Record
Immutable request to open or close a game's Nether access.
-
Constructor Summary
ConstructorsConstructorDescriptionNetherToggleRequest(boolean enabled) NetherToggleRequest(boolean enabled, Optional<Boolean> pvp, Optional<NetherBorderSettings> border) Creates an instance of aNetherToggleRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionborder()Returns the value of theborderrecord component.static NetherToggleRequestclose()booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static NetherToggleRequestopen()pvp()Returns the value of thepvprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NetherToggleRequest
public NetherToggleRequest(boolean enabled, Optional<Boolean> pvp, Optional<NetherBorderSettings> border) Creates an instance of aNetherToggleRequestrecord class.- Parameters:
enabled- the value for theenabledrecord componentpvp- the value for thepvprecord componentborder- the value for theborderrecord component
-
NetherToggleRequest
public NetherToggleRequest(boolean enabled)
-
-
Method Details
-
open
-
close
-
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 '=='. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
pvp
Returns the value of thepvprecord component.- Returns:
- the value of the
pvprecord component
-
border
Returns the value of theborderrecord component.- Returns:
- the value of the
borderrecord component
-