Record Class Cooldown
java.lang.Object
java.lang.Record
net.flectone.pulse.model.value.Cooldown
- Record Components:
enable- whether the cooldown is applied at allduration- the wait between uses, in seconds
How long a player must wait before triggering the same action again.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCooldown(boolean enable, long duration) Creates an instance of aCooldownrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongduration()Returns the value of thedurationrecord component.booleanenable()Returns the value of theenablerecord component.final booleanIndicates whether some other object is "equal to" this one.static CooldownReads a cooldown from its config representation.final inthashCode()Returns a hash code value for this object.toJson()Writes this cooldown back to its config representation.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
A disabled cooldown, which every disabled entry collapses to.
-
-
Constructor Details
-
Cooldown
-
-
Method Details
-
fromJson
-
toJson
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
enable
-
duration
-