Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.inventory.CraftingInventory Interface Reference
Inheritance diagram for org.bukkit.inventory.CraftingInventory:
org.bukkit.inventory.Inventory

Public Member Functions

ItemStack getResult ()
 
ItemStack[] getMatrix ()
 
void setResult (ItemStack newResult)
 
void setMatrix (ItemStack[] contents)
 
Recipe getRecipe ()
 
- Public Member Functions inherited from org.bukkit.inventory.Inventory
int getSize ()
 
int getMaxStackSize ()
 
void setMaxStackSize (int size)
 
String getName ()
 
ItemStack getItem (int index)
 
void setItem (int index, ItemStack item)
 
HashMap< Integer, ItemStackaddItem (ItemStack...items) throws IllegalArgumentException
 
HashMap< Integer, ItemStackremoveItem (ItemStack...items) throws IllegalArgumentException
 
ItemStack[] getContents ()
 
void setContents (ItemStack[] items) throws IllegalArgumentException
 
boolean contains (int materialId)
 
boolean contains (Material material) throws IllegalArgumentException
 
boolean contains (ItemStack item)
 
boolean contains (int materialId, int amount)
 
boolean contains (Material material, int amount) throws IllegalArgumentException
 
boolean contains (ItemStack item, int amount)
 
boolean containsAtLeast (ItemStack item, int amount)
 
HashMap< Integer,?extends ItemStackall (int materialId)
 
HashMap< Integer,?extends ItemStackall (Material material) throws IllegalArgumentException
 
HashMap< Integer,?extends ItemStackall (ItemStack item)
 
int first (int materialId)
 
int first (Material material) throws IllegalArgumentException
 
int first (ItemStack item)
 
int firstEmpty ()
 
void remove (int materialId)
 
void remove (Material material) throws IllegalArgumentException
 
void remove (ItemStack item)
 
void clear (int index)
 
void clear ()
 
List< HumanEntitygetViewers ()
 
String getTitle ()
 
InventoryType getType ()
 
InventoryHolder getHolder ()
 
ListIterator< ItemStackiterator ()
 
ListIterator< ItemStackiterator (int index)
 

Detailed Description

Interface to the crafting inventories

Definition at line 6 of file CraftingInventory.java.

Member Function Documentation

ItemStack [] org.bukkit.inventory.CraftingInventory.getMatrix ( )

Get the contents of the crafting matrix.

Returns
The contents.
Recipe org.bukkit.inventory.CraftingInventory.getRecipe ( )

Get the current recipe formed on the crafting inventory, if any.

Returns
The recipe, or null if the current contents don't match any recipe.

Referenced by org.bukkit.event.inventory.PrepareItemCraftEvent.getRecipe().

ItemStack org.bukkit.inventory.CraftingInventory.getResult ( )

Check what item is in the result slot of this crafting inventory.

Returns
The result item.
void org.bukkit.inventory.CraftingInventory.setMatrix ( ItemStack[]  contents)

Replace the contents of the crafting matrix

Parameters
contentsThe new contents.
Exceptions
IllegalArgumentExceptionif the length of contents is greater than the size of the crafting matrix.
void org.bukkit.inventory.CraftingInventory.setResult ( ItemStack  newResult)

Set the item in the result slot of the crafting inventory.

Parameters
newResultThe new result item.

The documentation for this interface was generated from the following file: