Enum Class CosmeticCategory

java.lang.Object
java.lang.Enum<CosmeticCategory>
dev.itsharshxd.zentrix.api.cosmetics.CosmeticCategory
All Implemented Interfaces:
Serializable, Comparable<CosmeticCategory>, Constable

public enum CosmeticCategory extends Enum<CosmeticCategory>
A kind of cosmetic players own and choose from.
Since:
1.8.0
  • Enum Constant Details

    • VICTORY_EFFECTS

      public static final CosmeticCategory VICTORY_EFFECTS
      The celebration played when the player wins.
    • GLIDERS

      public static final CosmeticCategory GLIDERS
      The glider the player flies into the map with.
    • CLASSES

      public static final CosmeticCategory CLASSES
      The battle class the player starts every match with, unless they pick another in the lobby. IDs are the class IDs of content/classes.yml, such as warrior.

      A class is unlocked by owning it or by holding its permission; a class without a permission is open to everyone. Unlike other categories, a class can be selected without being owned, since its permission may unlock it: the selection is only a preference, and a class that is locked when a match starts is replaced by the server's default class.

      Since:
      1.9.0
    • CAGE_DESIGNS

      public static final CosmeticCategory CAGE_DESIGNS
      The design of the cage around the player's Cornucopia podium. Not part of the Free edition.
      Since:
      1.11.0
  • Method Details

    • values

      public static CosmeticCategory[] 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 CosmeticCategory 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
    • getId

      @NotNull public @NotNull String getId()
      The ID used in commands, such as victory-effects.
    • key

      @NotNull public @NotNull CosmeticTypeKey key()
      The key this category has among every cosmetic type, such as zentrix:gliders.
      Since:
      1.11.0
    • fromId

      @NotNull public static @NotNull Optional<CosmeticCategory> fromId(@Nullable @Nullable String id)
      The category an ID names, ignoring case.