summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-02-04 12:15:48 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-02-04 12:15:48 +0000
commitbcecd8c6e37dcb9e3dfb3aa6c9b3fc76f0cdd85d (patch)
tree25132c9b01c9d5187ac0f4dbd22c9d2fe9f6c353 /src
parent90f43d486ab551ae0be47db21794c8064074a31b (diff)
parentc0050a95570fb4885c533710083ed8cba7571723 (diff)
downloadbukkit-bcecd8c6e37dcb9e3dfb3aa6c9b3fc76f0cdd85d.tar
bukkit-bcecd8c6e37dcb9e3dfb3aa6c9b3fc76f0cdd85d.tar.gz
bukkit-bcecd8c6e37dcb9e3dfb3aa6c9b3fc76f0cdd85d.tar.lz
bukkit-bcecd8c6e37dcb9e3dfb3aa6c9b3fc76f0cdd85d.tar.xz
bukkit-bcecd8c6e37dcb9e3dfb3aa6c9b3fc76f0cdd85d.zip
Merge branch 'master' of github.com:Bukkit/Bukkit
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/inventory/Inventory.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java
index e0b52562..01c9160c 100644
--- a/src/main/java/org/bukkit/inventory/Inventory.java
+++ b/src/main/java/org/bukkit/inventory/Inventory.java
@@ -97,6 +97,32 @@ public interface Inventory {
* @return If any matching ItemStacks were found
*/
public boolean contains(ItemStack item);
+
+ /**
+ * Check if the inventory contains any ItemStacks with the given materialId and at least the minimum amount specified
+ *
+ * @param materialId The materialId to check for
+ * @param amount The minimum amount to look for
+ * @return If any ItemStacks were found
+ */
+ public boolean contains(int materialId, int amount);
+
+ /**
+ * Check if the inventory contains any ItemStacks with the given material and at least the minimum amount specified
+ *
+ * @param material The material to check for
+ * @return If any ItemStacks were found
+ */
+ public boolean contains(Material material, int amount);
+
+ /**
+ * Check if the inventory contains any ItemStacks matching the given ItemStack and at least the minimum amount specified
+ * This will only match if both the type and the amount of the stack match
+ *
+ * @param item The ItemStack to match against
+ * @return If any matching ItemStacks were found
+ */
+ public boolean contains(ItemStack item, int amount);
/**
* Find all slots in the inventory containing any ItemStacks with the given materialId