diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-01-15 21:58:47 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-01-15 21:58:57 +0100 |
commit | 82137e085193acc8842e0148e758c5dbd8a4e8c1 (patch) | |
tree | cce2180a29a4c38bd46f0727a25690acc4d0d41b /src/main/java/org | |
parent | 8cf9d7fe6c7d1ef1d70fb1b14f2abc9b76d46280 (diff) | |
download | bukkit-82137e085193acc8842e0148e758c5dbd8a4e8c1.tar bukkit-82137e085193acc8842e0148e758c5dbd8a4e8c1.tar.gz bukkit-82137e085193acc8842e0148e758c5dbd8a4e8c1.tar.lz bukkit-82137e085193acc8842e0148e758c5dbd8a4e8c1.tar.xz bukkit-82137e085193acc8842e0148e758c5dbd8a4e8c1.zip |
Added Inventory.clear(|index) Inventory.remove(typeId|Material|ItemStack)
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/Inventory.java | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/Inventory.java b/src/main/java/org/bukkit/Inventory.java index a3233694..6a51c6d2 100644 --- a/src/main/java/org/bukkit/Inventory.java +++ b/src/main/java/org/bukkit/Inventory.java @@ -132,4 +132,38 @@ public interface Inventory { * @return The first empty Slot found. */ public int firstEmpty(); -}
\ No newline at end of file + + /** + * Remove all stacks in the inventory matching the given materialId. + * + * @param materialId The material to remove + */ + public void remove(int materialId); + + /** + * Remove all stacks in the inventory matching the given material. + * + * @param material The material to remove + */ + public void remove(Material material); + + /** + * Remove all stacks in the inventory matching the given stack. + * This will only match a slot if both the type and the amount of the stack match + * + * @param item The ItemStack to match against + */ + public void remove(ItemStack item); + + /** + * Clear out a particular slot in the index + * + * @param index The index to empty. + */ + public void clear(int index); + + /** + * Clear out the whole index + */ + public void clear(); +} |