Enum Class Rarity

java.lang.Object
java.lang.Enum<Rarity>
me.gamercoder215.starcosmetics.api.Rarity
All Implemented Interfaces:
Serializable, Comparable<Rarity>, Constable

public enum Rarity extends Enum<Rarity>
Represents a rarity used in a Cosmetic, Completion, or anything else.
  • Enum Constant Details

    • COMMON

      public static final Rarity COMMON
      Represents the common rarity.
    • OCCASIONAL

      public static final Rarity OCCASIONAL
      Represents the occasional rarity.
    • UNCOMMON

      public static final Rarity UNCOMMON
      Represents the uncommon rarity.
    • RARE

      public static final Rarity RARE
      Represents the rare rarity.
    • EPIC

      public static final Rarity EPIC
      Represents the epic rarity.
    • LEGENDARY

      public static final Rarity LEGENDARY
      Represents the legendary rarity.
    • MYTHICAL

      public static final Rarity MYTHICAL
      Represents the mythical rarity.
    • ULTRA

      public static final Rarity ULTRA
      Represents the ultra rarity.
    • SPECIAL

      public static final Rarity SPECIAL
      Represents the special rarity. This rarity is the only one with no visible requirements.
  • Method Details

    • values

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

      public static Rarity valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      @NotNull public @NotNull String toString()
      Overrides:
      toString in class Enum<Rarity>
    • getPrefix

      @NotNull public @NotNull String getPrefix()
      Fetches the Rarity's prefix, to mimic the Rarity Color.
      Returns:
      Rarity Prefix
    • hasVisibleRequirements

      public boolean hasVisibleRequirements()
      Whether this rarity has a visible Completion Requirement.
      Returns:
      true if requirement is visible, false otherwise