Package net.okocraft.box.api.util
Class InventoryUtil
java.lang.Object
net.okocraft.box.api.util.InventoryUtil
A utility class for an
Inventory.-
Method Summary
-
Method Details
-
putItems
public static int putItems(@NotNull @NotNull Inventory inventory, @NotNull @NotNull ItemStack item, int amount) Puts items in theInventory.- Parameters:
inventory- anInventoryto put items initem-ItemStackto putamount- amount of items to put- Returns:
- amount of items that could not be put in the
Inventorybecause it was full - Throws:
NullPointerException- ifinventoryoritemis nullIllegalArgumentException- ifamountis negative
-