summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/inventory/CraftingInventory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/bukkit/inventory/CraftingInventory.java')
-rw-r--r--src/main/java/org/bukkit/inventory/CraftingInventory.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/inventory/CraftingInventory.java b/src/main/java/org/bukkit/inventory/CraftingInventory.java
new file mode 100644
index 00000000..9c1a0c1e
--- /dev/null
+++ b/src/main/java/org/bukkit/inventory/CraftingInventory.java
@@ -0,0 +1,33 @@
+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();
+} \ No newline at end of file