Class InventoryContainer

java.lang.Object
net.botwithus.rs3.game.inventories.InventoryContainer

public class InventoryContainer extends Object
  • Method Details

    • getId

      public int getId()
      Get the id of the InventoryContainer
      Returns:
      the id of the InventoryContainer
    • isEmpty

      public boolean isEmpty()
    • isNotEmpty

      public boolean isNotEmpty()
    • contains

      public boolean contains(int id)
      Check if the InventoryContainer contains a specific item
      Parameters:
      id - the ids of the items to check for
      Returns:
      true if the InventoryContainer contains the item
    • contains

      public boolean contains(String name, long amount)
    • contains

      public boolean contains(int id, int amount)
    • contains

      public boolean contains(int id, int value, com.google.common.collect.Maps.EntryTransformer<Integer,Integer,Boolean> predicate)
    • slot

      public Item slot(int slot)
    • contains

      public boolean contains(String... names)
      Check if the InventoryContainer contains a specific item
      Parameters:
      names - the names of the items to check for
      Returns:
      true if the InventoryContainer contains the item
    • contains

      public boolean contains(Pattern pattern)
      Check if the InventoryContainer contains a specific item
      Parameters:
      pattern - the pattern to check for
      Returns:
      true if the InventoryContainer contains the item
    • isFull

      public boolean isFull()
    • containsCategory

      public boolean containsCategory(int category)
      Check if the InventoryContainer contains a specific category
      Parameters:
      category - the category to check for
      Returns:
      true if the InventoryContainer contains the category
    • containsCategories

      public boolean containsCategories(int... categories)
      Check if the InventoryContainer contains a specific category
      Parameters:
      categories - the categories to check for
      Returns:
      true if the InventoryContainer contains the category
    • getItems

      public List<Item> getItems()
    • of

      public static InventoryContainer of(int id)
      Create a new InventoryContainer
      Parameters:
      id - the id of the container
      Returns:
      a new InventoryContainer
    • of

      public static InventoryContainer of(int id, InventoryItemQuery query)
      Create a new InventoryContainer with an additional query
      Parameters:
      id - the id of the container
      query - the additional query
      Returns:
      a new InventoryContainer with the additional query