Enum ItemState
- java.lang.Object
-
- java.lang.Enum<ItemState>
-
- me.mrCookieSlime.Slimefun.Objects.SlimefunItem.ItemState
-
- All Implemented Interfaces:
Serializable
,Comparable<ItemState>
public enum ItemState extends Enum<ItemState>
Defines whether a SlimefunItem is enabled, disabled or fall-back to its vanilla behavior.- Author:
- Poslovitch
- See Also:
SlimefunItem
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISABLED
ThisSlimefunItem
is disabled and is not aVanillaItem
.ENABLED
ThisSlimefunItem
is enabled.UNREGISTERED
ThisSlimefunItem
has not been registered (yet).VANILLA_FALLBACK
ThisSlimefunItem
has fallen back to its vanilla behavior, because it is disabled and an instance ofVanillaItem
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ItemState
valueOf(String name)
Returns the enum constant of this type with the specified name.static ItemState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNREGISTERED
public static final ItemState UNREGISTERED
ThisSlimefunItem
has not been registered (yet).
-
ENABLED
public static final ItemState ENABLED
ThisSlimefunItem
is enabled.
-
DISABLED
public static final ItemState DISABLED
ThisSlimefunItem
is disabled and is not aVanillaItem
.
-
VANILLA_FALLBACK
public static final ItemState VANILLA_FALLBACK
ThisSlimefunItem
has fallen back to its vanilla behavior, because it is disabled and an instance ofVanillaItem
.
-
-
Method Detail
-
values
public static ItemState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ItemState c : ItemState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ItemState 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 nameNullPointerException
- if the argument is null
-
-