public enum ItemMaterial extends java.lang.Enum<ItemMaterial>
Enum Constant and Description |
---|
CLOTH |
IRON |
LEATHER |
NEPHRITE |
STEEL |
WOOD |
Modifier and Type | Method and Description |
---|---|
static ItemMaterial |
fromName(java.lang.String material)
Converts material name to ItemMaterial enum
|
static int |
fromNameToId(java.lang.String material)
Converts material name to material ID
|
java.lang.String |
toString()
Return material name
|
static ItemMaterial |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ItemMaterial[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ItemMaterial CLOTH
public static final ItemMaterial LEATHER
public static final ItemMaterial WOOD
public static final ItemMaterial IRON
public static final ItemMaterial STEEL
public static final ItemMaterial NEPHRITE
public static ItemMaterial[] values()
for (ItemMaterial c : ItemMaterial.values()) System.out.println(c);
public static ItemMaterial valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static int fromNameToId(java.lang.String material)
material
- Material namepublic static ItemMaterial fromName(java.lang.String material)
material
- String with material namepublic java.lang.String toString()
toString
in class java.lang.Enum<ItemMaterial>