Record Class ReviveTask
java.lang.Object
java.lang.Record
com.zetaplugins.lifestealz.util.revive.ReviveTask
- Record Components:
location- The location of the beacon where the revive task is taking place.task- The Bukkit task that manages the revive process.reviver- The UUID of the player revivingtarget-start- The timestamp when the revive process started (unix epoch in seconds).durationSeconds- The duration of the revive process in seconds.
public record ReviveTask(Location location, BukkitTask task, UUID reviver, UUID target, long start, int durationSeconds)
extends Record
Represents a revive task for a player at a specific location.
-
Constructor Summary
ConstructorsConstructorDescriptionReviveTask(Location location, BukkitTask task, UUID reviver, UUID target, long start, int durationSeconds) Creates an instance of aReviveTaskrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedurationSecondsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.reviver()Returns the value of thereviverrecord component.longstart()Returns the value of thestartrecord component.target()Returns the value of thetargetrecord component.task()Returns the value of thetaskrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReviveTask
public ReviveTask(Location location, BukkitTask task, UUID reviver, UUID target, long start, int durationSeconds) Creates an instance of aReviveTaskrecord class.- Parameters:
location- the value for thelocationrecord componenttask- the value for thetaskrecord componentreviver- the value for thereviverrecord componenttarget- the value for thetargetrecord componentstart- the value for thestartrecord componentdurationSeconds- the value for thedurationSecondsrecord component
-
-
Method Details
-
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 '=='. -
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
task
Returns the value of thetaskrecord component.- Returns:
- the value of the
taskrecord component
-
reviver
Returns the value of thereviverrecord component.- Returns:
- the value of the
reviverrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
start
public long start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
durationSeconds
public int durationSeconds()Returns the value of thedurationSecondsrecord component.- Returns:
- the value of the
durationSecondsrecord component
-