Enum CosmeticItemCategory

java.lang.Object
java.lang.Enum<CosmeticItemCategory>
de.marcely.bedwars.api.cosmetics.shop.CosmeticItemCategory
All Implemented Interfaces:
Serializable, Comparable<CosmeticItemCategory>, java.lang.constant.Constable

public enum CosmeticItemCategory extends Enum<CosmeticItemCategory>
Represents a category of cosmetic items.
See Also:
  • Enum Constant Details

    • ANIMATION_DEATH

      public static final CosmeticItemCategory ANIMATION_DEATH
      Played when the player with this cosmetic dies.
    • ANIMATION_KILL

      public static final CosmeticItemCategory ANIMATION_KILL
      Played when the player with this cosmetic kills another player.
    • ANIMATION_VICTORY

      public static final CosmeticItemCategory ANIMATION_VICTORY
      Played when the player with this cosmetic wins the game.
    • ANIMATION_BED_DESTROY

      public static final CosmeticItemCategory ANIMATION_BED_DESTROY
      Played when the player with this cosmetic destroys a bed.
    • ANIMATION_ROUND_START

      public static final CosmeticItemCategory ANIMATION_ROUND_START
      Played when the game starts for the player with this cosmetic.
    • ANIMATION_SHOOT_PROJECTILE

      public static final CosmeticItemCategory ANIMATION_SHOOT_PROJECTILE
      Played when the player with this cosmetic shoots a projectile.
    • SKIN_DEALER

      public static final CosmeticItemCategory SKIN_DEALER
      Changes the skin of a dealer.

      If there are multiple players with this cosmetic, a random skin will be chosen from the list of active skins.

    • SKIN_UPGRADE_DEALER

      public static final CosmeticItemCategory SKIN_UPGRADE_DEALER
      Changes the skin of an upgrade dealer.

      If there are multiple players with this cosmetic, a random skin will be chosen from the list of active skins.

    • SKIN_ALL_DEALER_TYPES

      public static final CosmeticItemCategory SKIN_ALL_DEALER_TYPES
      Changes the skin of both the dealer and upgrade dealer.

      If there are multiple players with this cosmetic, a random skin will be chosen from the list of active skins.

    • IMAGE_PARTICLE_SPAWNERS

      public static final CosmeticItemCategory IMAGE_PARTICLE_SPAWNERS
      Displays an image if a player with this item picks up a dropped item.

      This may be limited to certain items and only refers to items dropped by spawners/generators.

    • IMAGE_ITEM_FRAME

      public static final CosmeticItemCategory IMAGE_ITEM_FRAME
      Players with this item may click on an item frame to display an image in it.
    • KILL_MESSAGES

      public static final CosmeticItemCategory KILL_MESSAGES
      Changes the kill/death messages for players with this item.
    • SHOP_ITEM_PRODUCT_MODIFIER

      public static final CosmeticItemCategory SHOP_ITEM_PRODUCT_MODIFIER
      Modifies the products that are sold in the shop for players with this item.

      This is, by default, only used for wood skins.

  • Field Details

    • VALUES

      public static final CosmeticItemCategory[] VALUES
      A list of all possible shop item categories that exist.

      Same thing as values() but as a constant. Exists as creating a new copy each time is slow. Try to avoid changing its values!! This WILL cause problems. If you are insecure about it, use values() instead.

  • Method Details

    • values

      public static CosmeticItemCategory[] 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 CosmeticItemCategory 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
    • getDefaultItem

      public CosmeticItem getDefaultItem()
      Get the item that is used if none is selected for this category.
      Returns:
      The default item or null if none is set
    • setDefaultItem

      public void setDefaultItem(CosmeticItem defaultItem)
      Sets the item that is used if none is selected for this category.
      Parameters:
      defaultItem - The default item or null to remove it
    • isAnimation

      public boolean isAnimation()
      Checks if this category is an animation.

      This includes all that begin with "ANIMATION_".

      Returns:
      true if it is an animation, otherwise false
    • isSkin

      public boolean isSkin()
      Checks if this category changes the skin of a dealer.

      This includes all that begin with "SKIN_".

      Returns:
      true if it changes the skin of a dealer, otherwise false
    • isImage

      public boolean isImage()
      Checks if this category represents an image being displayed.

      This includes all that begin with "IMAGE_".

      Returns:
      true if it is an image, otherwise false
    • getSkinTargets

      public HologramControllerType[] getSkinTargets()
      Gets the hologram controller types that are targeted by this category.

      This method will return an empty array for all categories but those that are skin-related (isSkin() returns true).

      Returns:
      The hologram controller types that are targeted by this category
    • byName

      @Nullable public static @Nullable CosmeticItemCategory byName(String name)
      Gets the category by its Enum.name() while being case-insensitive.
      Parameters:
      name - The name to match
      Returns:
      The category or null if none was found