|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.material.MaterialData
public class MaterialData
Handles specific metadata for certain items or blocks
Constructor Summary | |
---|---|
MaterialData(int type)
|
|
MaterialData(int type,
byte data)
|
|
MaterialData(Material type)
|
|
MaterialData(Material type,
byte data)
|
Method Summary | |
---|---|
MaterialData |
clone()
|
boolean |
equals(Object obj)
|
byte |
getData()
Gets the raw data in this material |
Material |
getItemType()
Gets the Material that this MaterialData represents |
int |
getItemTypeId()
Gets the Material Id that this MaterialData represents |
int |
hashCode()
|
void |
setData(byte data)
Sets the raw data of this material |
ItemStack |
toItemStack()
Creates a new ItemStack based on this MaterialData |
ItemStack |
toItemStack(int amount)
Creates a new ItemStack based on this MaterialData |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MaterialData(int type)
public MaterialData(Material type)
public MaterialData(int type, byte data)
public MaterialData(Material type, byte data)
Method Detail |
---|
public byte getData()
public void setData(byte data)
data
- New raw datapublic Material getItemType()
public int getItemTypeId()
public ItemStack toItemStack()
public ItemStack toItemStack(int amount)
amount
- The stack size of the new stack
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public MaterialData clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |