Package valorless.rarespawns.datamodels
Class AbilityInfo
java.lang.Object
valorless.rarespawns.datamodels.AbilityInfo
Immutable data container describing metadata about a specific ability.
This class extracts and holds information from the AbilityInfo
annotation present on ability classes. It provides easy access to key properties such as the
ability's name, cooldown period, and whether it is single-use.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbilityInfo(String id) Constructs an AbilityInfo object by extracting metadata from the ability class associated with the given ID. -
Method Summary
Modifier and TypeMethodDescriptionstatic AbilityInfogetAbilityInfo(String id) Retrieves metadata about an ability by its unique ID.
-
Field Details
-
name
The name of the ability. -
cooldown
The cooldown period of the ability in seconds. -
singleUse
Whether the ability is single-use.
-
-
Constructor Details
-
AbilityInfo
Constructs an AbilityInfo object by extracting metadata from the ability class associated with the given ID.- Parameters:
id- The unique ID of the ability.
-
-
Method Details
-
getAbilityInfo
Retrieves metadata about an ability by its unique ID.- Parameters:
id- The unique ID of the ability.- Returns:
- An AbilityInfo object containing metadata about the ability.
-