Record Class CooldownResult.Cooling
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.cooldown.CooldownResult.Cooling
- All Implemented Interfaces:
CooldownResult
- Enclosing interface:
CooldownResult
public static record CooldownResult.Cooling(long remaining, TimeUnit unit, CooldownScope scope, net.kyori.adventure.key.Key id, Cooldown cooldown, Scheduler scheduler)
extends Record
implements CooldownResult
-
Nested Class Summary
Nested classes/interfaces inherited from interface CooldownResult
CooldownResult.Cooling, CooldownResult.Ready -
Constructor Summary
ConstructorsConstructorDescriptionCooling(long remaining, TimeUnit unit, CooldownScope scope, net.kyori.adventure.key.Key id, Cooldown cooldown, Scheduler scheduler) Creates an instance of aCoolingrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncooldown()Returns the value of thecooldownrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.kyori.adventure.key.Keyid()Returns the value of theidrecord component.ifCoolingLeft(BiConsumer<Long, TimeUnit> action) booleanisReady()onTick(long interval, TimeUnit tickUnit, BiConsumer<Long, TimeUnit> action) longReturns the value of theremainingrecord component.Returns the value of theschedulerrecord component.scope()Returns the value of thescoperecord component.final StringtoString()Returns a string representation of this record class.unit()Returns the value of theunitrecord component.
-
Constructor Details
-
Cooling
public Cooling(long remaining, TimeUnit unit, CooldownScope scope, net.kyori.adventure.key.Key id, Cooldown cooldown, Scheduler scheduler) Creates an instance of aCoolingrecord class.- Parameters:
remaining- the value for theremainingrecord componentunit- the value for theunitrecord componentscope- the value for thescoperecord componentid- the value for theidrecord componentcooldown- the value for thecooldownrecord componentscheduler- the value for theschedulerrecord component
-
-
Method Details
-
isReady
public boolean isReady()- Specified by:
isReadyin interfaceCooldownResult
-
ifReady
- Specified by:
ifReadyin interfaceCooldownResult
-
ifCoolingLeft
- Specified by:
ifCoolingLeftin interfaceCooldownResult
-
onExpire
- Specified by:
onExpirein interfaceCooldownResult
-
onTick
- Specified by:
onTickin interfaceCooldownResult
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
remaining
public long remaining()Returns the value of theremainingrecord component.- Returns:
- the value of the
remainingrecord component
-
unit
Returns the value of theunitrecord component.- Returns:
- the value of the
unitrecord component
-
scope
Returns the value of thescoperecord component.- Returns:
- the value of the
scoperecord component
-
id
public net.kyori.adventure.key.Key id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
cooldown
Returns the value of thecooldownrecord component.- Returns:
- the value of the
cooldownrecord component
-
scheduler
Returns the value of theschedulerrecord component.- Returns:
- the value of the
schedulerrecord component
-