mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
Add clear inventory API to PlayerInventory with a successful count return. Adds BUKKIT-2745
This commit is contained in:
parent
2d5ae73809
commit
0290aee17e
1 changed files with 11 additions and 0 deletions
|
@ -102,5 +102,16 @@ public interface PlayerInventory extends Inventory {
|
||||||
*/
|
*/
|
||||||
public int getHeldItemSlot();
|
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();
|
public HumanEntity getHolder();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue