Enum CosmeticItemCategory
- All Implemented Interfaces:
Serializable
,Comparable<CosmeticItemCategory>
,java.lang.constant.Constable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPlayed when the player with this cosmetic destroys a bed.Played when the player with this cosmetic dies.Played when the player with this cosmetic kills another player.Played when the game starts for the player with this cosmetic.Played when the player with this cosmetic shoots a projectile.Played when the player with this cosmetic wins the game.Players with this item may click on an item frame to display an image in it.Displays an image if a player with this item picks up a dropped item.Changes the kill/death messages for players with this item.Modifies the products that are sold in the shop for players with this item.Changes the skin of both the dealer and upgrade dealer.Changes the skin of a dealer.Changes the skin of an upgrade dealer. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CosmeticItemCategory[]
A list of all possible shop item categories that exist. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable CosmeticItemCategory
Gets the category by itsEnum.name()
while being case-insensitive.Get the item that is used if none is selected for this category.Gets the hologram controller types that are targeted by this category.boolean
Checks if this category is an animation.boolean
isImage()
Checks if this category represents an image being displayed.boolean
isSkin()
Checks if this category changes the skin of a dealer.void
setDefaultItem
(CosmeticItem defaultItem) Sets the item that is used if none is selected for this category.static CosmeticItemCategory
Returns the enum constant of this type with the specified name.static CosmeticItemCategory[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ANIMATION_DEATH
Played when the player with this cosmetic dies. -
ANIMATION_KILL
Played when the player with this cosmetic kills another player. -
ANIMATION_VICTORY
Played when the player with this cosmetic wins the game. -
ANIMATION_BED_DESTROY
Played when the player with this cosmetic destroys a bed. -
ANIMATION_ROUND_START
Played when the game starts for the player with this cosmetic. -
ANIMATION_SHOOT_PROJECTILE
Played when the player with this cosmetic shoots a projectile. -
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
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
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
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
Players with this item may click on an item frame to display an image in it. -
KILL_MESSAGES
Changes the kill/death messages for players with this item. -
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
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
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
Sets the item that is used if none is selected for this category.- Parameters:
defaultItem
- The default item ornull
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, otherwisefalse
-
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, otherwisefalse
-
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, otherwisefalse
-
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
Gets the category by itsEnum.name()
while being case-insensitive.- Parameters:
name
- The name to match- Returns:
- The category or
null
if none was found
-