mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
Added Invenrory.removeItem(ItemStack...)
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
parent
c95bbac2bd
commit
c72a7064d8
@ -38,13 +38,27 @@ public interface Inventory {
|
|||||||
public void setItem(int index, ItemStack item);
|
public void setItem(int index, ItemStack item);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores the given ItemStacks in the inventory
|
* Stores the given ItemStacks in the inventory.
|
||||||
|
*
|
||||||
|
* This will try to fill existing stacks and empty slots as good as it can.
|
||||||
|
* It will return a HashMap of what it couldn't fit.
|
||||||
*
|
*
|
||||||
* @param items The ItemStacks to add
|
* @param items The ItemStacks to add
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public HashMap<Integer, ItemStack> addItem(ItemStack... items);
|
public HashMap<Integer, ItemStack> addItem(ItemStack... items);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the given ItemStacks from the inventory.
|
||||||
|
*
|
||||||
|
* It will try to remove 'as much as possible' from the types and amounts you
|
||||||
|
* give as arguments. It will return a HashMap of what it couldn't remove.
|
||||||
|
*
|
||||||
|
* @param items The ItemStacks to remove
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public HashMap<Integer, ItemStack> removeItem(ItemStack... items);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all ItemStacks from the inventory
|
* Get all ItemStacks from the inventory
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user