Package valorless.rarespawns.datamodels
Class CooldownKey
java.lang.Object
valorless.rarespawns.datamodels.CooldownKey
Immutable key combining a player UUID and a Soul Power ID for cooldown maps.
Instances are used as stable keys in in-memory cooldown registries. The
toString() format is "
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCooldownKey(String uuid, String id) Creates a key from a UUID String and power ID.CooldownKey(UUID uuid, String id) Creates a key from a UUID and power ID.CooldownKey(org.bukkit.entity.Player player, String id) Creates a key from a Player and power ID. -
Method Summary
-
Field Details
-
player
The unique identifier of the player. -
power
The ID of the Soul Power this key refers to.
-
-
Constructor Details
-
CooldownKey
Creates a key from a UUID and power ID.- Parameters:
uuid- the player's UUIDid- the power ID
-
CooldownKey
Creates a key from a UUID String and power ID.- Parameters:
uuid- the player's UUID in string formid- the power ID- Throws:
IllegalArgumentException- if the UUID string is invalid
-
CooldownKey
Creates a key from a Player and power ID.- Parameters:
player- the player instanceid- the power ID
-
-
Method Details