Record Class PlayerCooldowns
java.lang.Object
java.lang.Record
com.cotani.cooldown.cache.PlayerCooldowns
@NullMarked
public record PlayerCooldowns(UUID playerId, Map<String, CooldownEntry> activeCooldowns)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerCooldowns(UUID playerId) PlayerCooldowns(UUID playerId, Map<String, CooldownEntry> activeCooldowns) Creates an instance of aPlayerCooldownsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveCooldownsrecord component.checkAndStart(CooldownKey key, Duration duration, Instant now) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.playerId()Returns the value of theplayerIdrecord component.voidput(CooldownEntry entry) voidfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlayerCooldowns
Creates an instance of aPlayerCooldownsrecord class.- Parameters:
playerId- the value for theplayerIdrecord componentactiveCooldowns- the value for theactiveCooldownsrecord component
-
PlayerCooldowns
-
-
Method Details
-
activeCooldowns
Returns the value of theactiveCooldownsrecord component.- Returns:
- the value of the
activeCooldownsrecord component
-
activeCooldownsUnsafe
-
find
-
put
-
remove
-
checkAndStart
-
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 withObjects::equals(Object,Object). -
playerId
Returns the value of theplayerIdrecord component.- Returns:
- the value of the
playerIdrecord component
-