Enum StatPeriod

java.lang.Object
java.lang.Enum<StatPeriod>
net.blueva.arcade.api.stats.StatPeriod
All Implemented Interfaces:
Serializable, Comparable<StatPeriod>

public enum StatPeriod extends Enum<StatPeriod>
Represents time periods for statistic tracking and leaderboards.

Stat periods allow tracking player performance over different time frames, enabling both historical all-time records and current seasonal competitions.

  • Enum Constant Details

    • ALLTIME

      public static final StatPeriod ALLTIME
      All-time statistics tracking from the beginning.

      This period includes all historical data without any time restrictions. Used for lifetime achievement tracking and permanent leaderboards.

    • YEARLY

      public static final StatPeriod YEARLY
      Yearly statistics that reset annually.

      Tracks performance within the current calendar year. Used for annual seasons and yearly competitions.

    • MONTHLY

      public static final StatPeriod MONTHLY
      Monthly statistics that reset each month.

      Tracks performance within the current calendar month. Used for monthly competitions and short-term leaderboards.

  • Method Details

    • values

      public static StatPeriod[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StatPeriod valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • id

      public String id()
      Gets the string identifier for this period.
      Returns:
      the period ID
    • fromId

      public static StatPeriod fromId(String input)
      Parses a stat period from its string ID.
      Parameters:
      input - the period ID string (case-insensitive)
      Returns:
      the matching StatPeriod, or null if not found