Class InventoryUtil

java.lang.Object
net.okocraft.box.api.util.InventoryUtil

public final class InventoryUtil extends Object
A utility class for an Inventory.
  • 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 the Inventory.
      Parameters:
      inventory - an Inventory to put items in
      item - ItemStack to put
      amount - amount of items to put
      Returns:
      amount of items that could not be put in the Inventory because it was full
      Throws:
      NullPointerException - if inventory or item is null
      IllegalArgumentException - if amount is negative