Class AbilityInfo

java.lang.Object
valorless.rarespawns.datamodels.AbilityInfo

public class AbilityInfo extends Object
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 Details

    • name

      public final String name
      The name of the ability.
    • cooldown

      public final Double cooldown
      The cooldown period of the ability in seconds.
    • singleUse

      public final Boolean singleUse
      Whether the ability is single-use.
  • Constructor Details

    • AbilityInfo

      public AbilityInfo(String id)
      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

      public static AbilityInfo getAbilityInfo(String id)
      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.