blob: f71533c746b733400f2d7ce095c48a2b86fe3787 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
package org.bukkit.inventory;
/**
* Interface to the crafting inventories
*/
public interface CraftingInventory extends Inventory {
/**
* Check what item is in the result slot of this crafting inventory.
*
* @return The result item.
*/
ItemStack getResult();
/**
* Get the contents of the crafting matrix.
*
* @return The contents.
*/
ItemStack[] getMatrix();
/**
* Set the item in the result slot of the crafting inventory.
*
* @param newResult The new result item.
*/
void setResult(ItemStack newResult);
/**
* Replace the contents of the crafting matrix
*
* @param contents The new contents.
* @throws IllegalArgumentException if the length of contents is greater
* than the size of the crafting matrix.
*/
void setMatrix(ItemStack[] contents);
/**
* Get the current recipe formed on the crafting inventory, if any.
*
* @return The recipe, or null if the current contents don't match any
* recipe.
*/
Recipe getRecipe();
}
|