Record Class DragonFlight
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.dragon.DragonFlight
public record DragonFlight(@NotNull UUID dragonId, @NotNull org.bukkit.Location start, @NotNull org.bukkit.Location destination, @NotNull Set<UUID> passengers, @NotNull List<DragonEndpointChunk> endpointChunks, @NotNull DragonFlightStatus status, long startedAtMillis, long completedAtMillis)
extends Record
Immutable route, passenger, endpoint, and lifecycle snapshot of one dragon bus.
-
Constructor Summary
ConstructorsConstructorDescriptionDragonFlight(@NotNull UUID dragonId, @NotNull org.bukkit.Location start, @NotNull org.bukkit.Location destination, @NotNull Set<UUID> passengers, @NotNull List<DragonEndpointChunk> endpointChunks, @NotNull DragonFlightStatus status, long startedAtMillis, long completedAtMillis) Creates an instance of aDragonFlightrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()booleanarrived()longReturns the value of thecompletedAtMillisrecord component.org.bukkit.LocationReturns the value of thedestinationrecord component.@NotNull UUIDdragonId()Returns the value of thedragonIdrecord component.@NotNull List<DragonEndpointChunk> Returns the value of theendpointChunksrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepassengersrecord component.org.bukkit.Locationstart()Returns the value of thestartrecord component.longReturns the value of thestartedAtMillisrecord component.@NotNull DragonFlightStatusstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DragonFlight
public DragonFlight(@NotNull @NotNull UUID dragonId, @NotNull @NotNull org.bukkit.Location start, @NotNull @NotNull org.bukkit.Location destination, @NotNull @NotNull Set<UUID> passengers, @NotNull @NotNull List<DragonEndpointChunk> endpointChunks, @NotNull @NotNull DragonFlightStatus status, long startedAtMillis, long completedAtMillis) Creates an instance of aDragonFlightrecord class.- Parameters:
dragonId- the value for thedragonIdrecord componentstart- the value for thestartrecord componentdestination- the value for thedestinationrecord componentpassengers- the value for thepassengersrecord componentendpointChunks- the value for theendpointChunksrecord componentstatus- the value for thestatusrecord componentstartedAtMillis- the value for thestartedAtMillisrecord componentcompletedAtMillis- the value for thecompletedAtMillisrecord component
-
-
Method Details
-
start
public org.bukkit.Location start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
destination
public org.bukkit.Location destination()Returns the value of thedestinationrecord component.- Returns:
- the value of the
destinationrecord component
-
active
public boolean active() -
arrived
public boolean arrived() -
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 '=='. -
dragonId
Returns the value of thedragonIdrecord component.- Returns:
- the value of the
dragonIdrecord component
-
passengers
Returns the value of thepassengersrecord component.- Returns:
- the value of the
passengersrecord component
-
endpointChunks
Returns the value of theendpointChunksrecord component.- Returns:
- the value of the
endpointChunksrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
startedAtMillis
public long startedAtMillis()Returns the value of thestartedAtMillisrecord component.- Returns:
- the value of the
startedAtMillisrecord component
-
completedAtMillis
public long completedAtMillis()Returns the value of thecompletedAtMillisrecord component.- Returns:
- the value of the
completedAtMillisrecord component
-