diff options
author | EvilSeph <evilseph@gmail.com> | 2012-10-30 04:52:43 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-10-30 04:52:43 -0400 |
commit | 0290aee17effcc2a30fede1fe5ae7fac93da011f (patch) | |
tree | a2bda11dc1511c796ca577623b72c57b7b9b0fcf /src/main | |
parent | 2d5ae73809c4322878534c6abb1b0b58061f0374 (diff) | |
download | bukkit-0290aee17effcc2a30fede1fe5ae7fac93da011f.tar bukkit-0290aee17effcc2a30fede1fe5ae7fac93da011f.tar.gz bukkit-0290aee17effcc2a30fede1fe5ae7fac93da011f.tar.lz bukkit-0290aee17effcc2a30fede1fe5ae7fac93da011f.tar.xz bukkit-0290aee17effcc2a30fede1fe5ae7fac93da011f.zip |
Add clear inventory API to PlayerInventory with a successful count return. Adds BUKKIT-2745
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/inventory/PlayerInventory.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java index 57221091..6931ccf9 100644 --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java +++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java @@ -102,5 +102,16 @@ public interface PlayerInventory extends Inventory { */ public int getHeldItemSlot(); + /** + * Clears all matching items from the inventory. Setting either value to -1 will skip it's check, + * while setting both to -1 will clear all items in your inventory unconditionally. + * + * @param id the id of the item you want to clear from the inventory + * @param data the data of the item you want to clear from the inventory + * + * @return The number of items cleared + */ + public int clear(int id, int data); + public HumanEntity getHolder(); } |