|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.quartercode.quarterbukkit.api.ItemData
public class ItemData
Constructor Summary | |
---|---|
ItemData(org.bukkit.block.Block block)
Creates a new item data object and fills it with the data of a Block . |
|
ItemData(org.bukkit.inventory.ItemStack itemStack)
Creates a new item data object and fills it with the data of an ItemStack . |
|
ItemData(org.bukkit.Material material)
Creates a new item data object and fills it with a Material . |
|
ItemData(org.bukkit.Material material,
byte data)
Creates a new item data object and fills it with a Material and a data value. |
Method Summary | |
---|---|
void |
apply(org.bukkit.block.Block block)
Applys the data of this item data object to an Block . |
void |
apply(org.bukkit.inventory.ItemStack itemStack)
Applys the data of this item data object to an ItemStack . |
boolean |
contains(org.bukkit.inventory.Inventory inventory)
Returns if the given Inventory contains at least one ItemStack with the data of this item data object. |
boolean |
containsAtLeast(org.bukkit.inventory.Inventory inventory,
int minimumAmount)
Returns if the given Inventory contains at least the given amount of ItemStack s with the data of this item data object. |
boolean |
equals(org.bukkit.block.Block block)
Returns if the data of this item data object equals the data from an Block . |
static boolean |
equals(org.bukkit.block.Block block1,
org.bukkit.block.Block block2)
Checks if two Block s are the same. |
boolean |
equals(ItemData itemData)
Returns if this item data object equals another. |
boolean |
equals(org.bukkit.inventory.ItemStack itemStack)
Returns if the data of this item data object equals the data from an ItemStack . |
static boolean |
equals(org.bukkit.inventory.ItemStack itemStack1,
org.bukkit.inventory.ItemStack itemStack2)
Checks if two ItemStack s are the same. |
boolean |
equals(java.lang.Object object)
|
byte |
getData()
Returns the data value of the item data object. |
org.bukkit.Material |
getMaterial()
Returns the Material of the item data object. |
void |
setData(byte data)
Sets the data value of the item data object. |
void |
setMaterial(org.bukkit.Material material)
Sets the Material of the item data object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ItemData(org.bukkit.Material material)
Material
.
material
- The Material
.public ItemData(org.bukkit.Material material, byte data)
Material
and a data value.
material
- The Material
.data
- The data value.public ItemData(org.bukkit.inventory.ItemStack itemStack)
ItemStack
.
itemStack
- The ItemStack
to read the data from.public ItemData(org.bukkit.block.Block block)
Block
.
block
- The Block
to read the data from.Method Detail |
---|
public static boolean equals(org.bukkit.inventory.ItemStack itemStack1, org.bukkit.inventory.ItemStack itemStack2)
ItemStack
s are the same.
itemStack1
- The first ItemStack
.itemStack2
- The second ItemStack
.
ItemStack
s are the same.public static boolean equals(org.bukkit.block.Block block1, org.bukkit.block.Block block2)
Block
s are the same.
block1
- The first Block
.block2
- The second Block
.
Block
s are the same.public org.bukkit.Material getMaterial()
Material
of the item data object.
Material
of the item data object.public void setMaterial(org.bukkit.Material material)
Material
of the item data object.
material
- The new Material
of the item data object.public byte getData()
public void setData(byte data)
data
- The new data value of the item data object.public boolean equals(ItemData itemData)
itemData
- The item data object to compare with.
public boolean equals(org.bukkit.inventory.ItemStack itemStack)
ItemStack
.
itemStack
- The ItemStack
to compare with.
ItemStack
.public boolean equals(org.bukkit.block.Block block)
Block
.
block
- The Block
to compare with.
Block
.public boolean contains(org.bukkit.inventory.Inventory inventory)
Inventory
contains at least one ItemStack
with the data of this item data object.
inventory
- The Inventory
to check.
Inventory
contains at least one ItemStack
with the data of this item data object.public boolean containsAtLeast(org.bukkit.inventory.Inventory inventory, int minimumAmount)
Inventory
contains at least the given amount of ItemStack
s with the data of this item data object.
inventory
- The Inventory
to check.minimumAmount
- The minimum count of item stacks.
Inventory
contains at least the given amount of ItemStack
s with the data of this item data object.public void apply(org.bukkit.inventory.ItemStack itemStack)
ItemStack
.
itemStack
- The ItemStack
to apply the data.public void apply(org.bukkit.block.Block block)
Block
.
block
- The Block
to apply the data.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |