Record Class TeleportDestination
java.lang.Object
java.lang.Record
com.winterhavenmc.lodestar.models.destination.TeleportDestination
- All Implemented Interfaces:
com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.displayname.DisplayNameable,com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.location.Locatable,Destination,ValidDestination
public record TeleportDestination(String displayName, ValidLocation location)
extends Record
implements ValidDestination, com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.location.Locatable
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.location.Locatable
com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.location.Locatable.Field -
Field Summary
Fields inherited from interface com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.displayname.DisplayNameable
VALID_DISPLAY_NAME -
Constructor Summary
ConstructorsConstructorDescriptionTeleportDestination(String displayName, ValidLocation location) Creates an instance of aTeleportDestinationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.org.bukkit.Locationfinal inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.static Destinationof(ValidDestination validDestination, ValidLocation validLocation) @NotNull StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.displayname.DisplayNameable
extractDisplayNameMethods inherited from interface com.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.location.Locatable
extractLocationMethods inherited from interface com.winterhavenmc.lodestar.models.destination.ValidDestination
getDisplayName, key
-
Constructor Details
-
TeleportDestination
Creates an instance of aTeleportDestinationrecord class.- Parameters:
displayName- the value for thedisplayNamerecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
of
-
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. -
getLocation
public org.bukkit.Location getLocation()- Specified by:
getLocationin interfacecom.winterhavenmc.library.messagebuilder.core.ports.pipeline.accessors.location.Locatable
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
displayName
Returns the value of thedisplayNamerecord component.- Specified by:
displayNamein interfaceValidDestination- Returns:
- the value of the
displayNamerecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-