Enum Class CustomItemType
- All Implemented Interfaces:
Serializable
,Comparable<CustomItemType>
,Constable
Represents the type of a custom item in the LifeStealZ plugin.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomItemType
fromCustomItem
(String customItemId, org.bukkit.configuration.file.FileConfiguration config) Returns the CustomItemType for the given custom item ID from the configuration.static CustomItemType
fromString
(String type) Returns the CustomItemType corresponding to the given string.getType()
boolean
is
(org.bukkit.inventory.ItemStack item) Checks if the given ItemStack is of this CustomItemType.static CustomItemType
Returns the enum constant of this class with the specified name.static CustomItemType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HEART
-
REVIVE
-
REVIVE_BEACON
-
NONE
-
NONUSABLE
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getType
-
is
public boolean is(org.bukkit.inventory.ItemStack item) Checks if the given ItemStack is of this CustomItemType.- Parameters:
item
- the ItemStack to check- Returns:
- true if the ItemStack is of this CustomItemType, false otherwise
-
fromString
Returns the CustomItemType corresponding to the given string.- Parameters:
type
- the string representation of the custom item type- Returns:
- the CustomItemType corresponding to the string, or NONE if not found
-
fromCustomItem
public static CustomItemType fromCustomItem(String customItemId, org.bukkit.configuration.file.FileConfiguration config) Returns the CustomItemType for the given custom item ID from the configuration.- Parameters:
customItemId
- the ID of the custom itemconfig
- the configuration file containing custom item definitions- Returns:
- the CustomItemType for the given custom item ID, or NONE if not found
-