Interface CosmeticItemCategory


public interface CosmeticItemCategory
Represents a category of cosmetic items.
See Also:
  • Field Details

    • ANIMATION_DEATH

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

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

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

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

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

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

      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

      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

      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

      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

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

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

      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.

  • Method Details

    • getId

      String getId()
      Gets the unique identifier of this category.

      For the built-in ones, it will be the same as the name of the fields.

      Returns:
      The unique identifier of this category
    • getPlugin

      Plugin getPlugin()
      Get the plugin that registered this category.
      Returns:
      The plugin that registered this category
    • isRegistered

      boolean isRegistered()
      Checks if this category is registered.
      Returns:
      true if it is registered, otherwise false
    • isAnimation

      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

      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

      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

      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
    • getDefaultItem

      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

      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