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
Modifier and TypeMethodDescriptionstatic int
putItems
(@NotNull org.bukkit.inventory.Inventory inventory, @NotNull org.bukkit.inventory.ItemStack item, int amount) Puts items in theInventory
.
-
Method Details
-
putItems
public static int putItems(@NotNull @NotNull org.bukkit.inventory.Inventory inventory, @NotNull @NotNull org.bukkit.inventory.ItemStack item, int amount) Puts items in theInventory
.- Parameters:
inventory
- anInventory
to put items initem
-ItemStack
to putamount
- amount of items to put- Returns:
- amount of items that could not be put in the
Inventory
because it was full - Throws:
NullPointerException
- ifinventory
oritem
is nullIllegalArgumentException
- ifamount
is negative
-