Class Bank

java.lang.Object
net.storm.sdk.items.Bank

public class Bank extends Object
Static utility class for interacting with the player's bank.

The bank is a storage system where players can store items. This class provides methods to open the bank, deposit and withdraw items, manage bank tabs, and query bank contents.

Example usage:


 // Open the nearest bank
 Bank.open();

 // Wait for bank to open and deposit all items
 if (Bank.isOpen()) {
     Bank.depositInventory();
 }

 // Withdraw specific items
 Bank.withdraw("Lobster", 10);
 Bank.withdrawAll("Coins");

 // Check if bank contains items
 if (Bank.contains("Dragon bones")) {
     int count = Bank.getCount(true, "Dragon bones");
 }

 // Use quantity modes
 Bank.setQuantityMode(Bank.QuantityMode.ALL);

 // Work with bank tabs
 if (Bank.hasTabs()) {
     Bank.openTab(1);
 }
 

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enumeration of bank interface widget components.
    static class 
    Nested utility class for interacting with the inventory panel while the bank is open.
    static enum 
    Enumeration of bank withdraw quantity modes.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Closes the bank interface.
    static void
    collapseTab(int index)
    Collapses a specific bank tab by index, moving its items to the main tab.
    static void
    Collapses all bank tabs, moving their items to the main tab.
    static boolean
    contains(int... id)
    Checks if the bank contains any item matching any of the specified IDs.
    static boolean
    contains(String... name)
    Checks if the bank contains any item matching any of the specified names.
    static boolean
    contains(Predicate<? super IItem> filter)
    Checks if the bank contains any item matching the specified filter.
    static boolean
    containsAll(int... ids)
    Checks if the bank contains all items with the specified IDs.
    static boolean
    containsAll(String... names)
    Checks if the bank contains all items with the specified names.
    static void
    deposit(int id, int amount)
    Deposits a specific amount of an item by ID.
    static void
    deposit(String name, int amount)
    Deposits a specific amount of an item by name.
    static void
    deposit(Predicate<? super IItem> filter, int amount)
    Deposits a specific amount of items matching the filter.
    static void
    depositAll(int... ids)
    Deposits all items matching the specified IDs from inventory into the bank.
    static void
    depositAll(String... names)
    Deposits all items matching the specified names from inventory into the bank.
    static void
    depositAll(Predicate<? super IItem> filter)
    Deposits all items matching the filter from inventory into the bank.
    static void
    depositAllExcept(int... ids)
    Deposits all items except those matching the specified IDs.
    static void
    Deposits all items except those matching the specified names.
    static void
    depositAllExcept(Predicate<? super IItem> filter)
    Deposits all items except those matching the filter.
    static void
    Deposits all equipped items into the bank.
    static void
    Deposits all items from the player's inventory into the bank.
    static void
    Empties all containers (such as looting bag, seed box) into the bank.
    static IBankItem
    get(int slot)
    Gets the bank item at the specified slot.
    static List<IBankItem>
    Gets all items currently in the bank.
    static List<IBankItem>
    getAll(int... ids)
    Gets all items in the bank matching any of the specified IDs.
    static List<IBankItem>
    getAll(String... names)
    Gets all items in the bank matching any of the specified names.
    static List<IBankItem>
    getAll(Predicate<? super IItem> filter)
    Gets all items in the bank matching the specified filter.
    static int
    Gets the total capacity of the bank.
    static int
    getCount(boolean stacks, int... ids)
    Counts items in the bank matching any of the specified IDs.
    static int
    getCount(boolean stacks, String... names)
    Counts items in the bank matching any of the specified names.
    static int
    getCount(boolean stacks, Predicate<IItem> filter)
    Counts items in the bank matching the filter.
    static int
    getCount(int... ids)
    Counts the number of item stacks matching any of the specified IDs.
    static int
    getCount(String... names)
    Counts the number of item stacks matching any of the specified names.
    static int
    Counts the number of item stacks matching the filter.
    static IBankItem
    getFirst(int... ids)
    Gets the first item in the bank matching any of the specified IDs.
    static IBankItem
    getFirst(String... names)
    Gets the first item in the bank matching any of the specified names.
    static IBankItem
    getFirst(Predicate<? super IItem> filter)
    Gets the first item in the bank matching the specified filter.
    static int
    Gets the number of free slots available in the bank.
    static IBankItem
    getLast(int... ids)
    Gets the last item in the bank matching any of the specified IDs.
    static IBankItem
    getLast(String... names)
    Gets the last item in the bank matching any of the specified names.
    static IBankItem
    getLast(Predicate<? super IItem> filter)
    Gets the last item in the bank matching the specified filter.
    static int
    Gets the number of occupied slots in the bank.
    Gets the current withdraw quantity mode setting.
    static List<IWidget>
    Gets all bank tab widgets.
    static boolean
    Checks if the bank has any custom tabs configured.
    static boolean
    Checks if the bank contains no items.
    static boolean
    Checks if the main bank tab is currently selected.
    static boolean
    Checks if the current withdraw mode is set to noted.
    static boolean
    Checks if the bank interface is currently open.
    static boolean
    Checks if the bank PIN entry screen is currently displayed.
    static boolean
    Checks if the bank settings menu is currently open.
    static boolean
    isTabOpen(int index)
    Checks if a specific bank tab is currently selected.
    static void
    Opens the nearest bank to the player.
    static void
    open(net.runelite.api.coords.WorldArea area)
    Opens a bank within the specified world area.
    static void
    open(net.runelite.api.coords.WorldArea area, int offset)
    Opens a bank within the specified area with an offset.
    static void
    open(net.runelite.api.coords.WorldArea area, int offset, BooleanSupplier requirements)
    Opens a bank within the specified area with an offset and requirements check.
    static void
    open(BankLocation bankLocation)
    Opens a bank at the specified bank location.
    static void
    Opens the main bank tab, showing all items.
    static void
    openTab(int index)
    Opens a specific bank tab by index.
    static void
    quickDeposit(int id, int amount)
    Quickly deposits a specific amount of an item by ID using optimized interactions.
    static void
    quickDeposit(String name, int amount)
    Quickly deposits a specific amount of an item by name using optimized interactions.
    static void
    quickDeposit(Predicate<IItem> filter, int amount)
    Quickly deposits a specific amount of items matching the filter using optimized interactions.
    static void
    quickWithdraw(int id, int amount)
    Quickly withdraws a specific amount of an item by ID using optimized interactions.
    static void
    quickWithdraw(int id, int amount, WithdrawMode withdrawMode)
    Quickly withdraws a specific amount of an item by ID with a specific withdraw mode.
    static void
    quickWithdraw(String name, int amount)
    Quickly withdraws a specific amount of an item by name using optimized interactions.
    static void
    quickWithdraw(String name, int amount, WithdrawMode withdrawMode)
    Quickly withdraws a specific amount of an item by name with a specific withdraw mode.
    static void
    quickWithdraw(Predicate<IItem> filter, int amount)
    Quickly withdraws a specific amount of items matching the filter using optimized interactions.
    static void
    quickWithdraw(Predicate<IItem> filter, int amount, WithdrawMode withdrawMode)
    Quickly withdraws a specific amount of items matching the filter with a specific withdraw mode.
    static void
    Releases all placeholders in the bank.
    static void
    Sets the withdraw quantity mode for bank operations.
    static void
    setWithdrawMode(boolean noted)
    Sets whether items should be withdrawn as notes or as regular items.
    static void
    Toggles the bank settings menu open or closed.
    static void
    withdraw(int id, int amount)
    Withdraws a specific amount of an item by ID from the bank.
    static void
    withdraw(int id, int amount, WithdrawMode withdrawMode)
    Withdraws a specific amount of an item by ID with a specific withdraw mode.
    static void
    withdraw(String name, int amount)
    Withdraws a specific amount of an item by name from the bank.
    static void
    withdraw(String name, int amount, WithdrawMode withdrawMode)
    Withdraws a specific amount of an item by name with a specific withdraw mode.
    static void
    withdraw(Predicate<IItem> filter, int amount)
    Withdraws a specific amount of items matching the filter from the bank.
    static void
    withdraw(Predicate<IItem> filter, int amount, WithdrawMode withdrawMode)
    Withdraws a specific amount of items matching the filter with a specific withdraw mode.
    static void
    withdrawAll(int id)
    Withdraws all of an item by ID from the bank.
    static void
    withdrawAll(int id, WithdrawMode withdrawMode)
    Withdraws all of an item by ID with a specific withdraw mode.
    static void
    Withdraws all of an item by name from the bank.
    static void
    withdrawAll(String name, WithdrawMode withdrawMode)
    Withdraws all of an item by name with a specific withdraw mode.
    static void
    Withdraws all items matching the filter from the bank.
    static void
    withdrawAll(Predicate<IItem> filter, WithdrawMode withdrawMode)
    Withdraws all items matching the filter with a specific withdraw mode.
    static void
    Withdraws an item using the last used quantity setting.
    static void
    withdrawLastQuantity(int id, WithdrawMode withdrawMode)
    Withdraws an item using the last used quantity setting with a specific withdraw mode.
    static void
    Withdraws an item using the last used quantity setting.
    static void
    Withdraws an item using the last used quantity setting with a specific withdraw mode.
    static void
    Withdraws items matching the filter using the last used quantity setting.
    static void
    Withdraws items matching the filter using the last used quantity setting with a specific withdraw mode.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Bank

      public Bank()
  • Method Details

    • open

      public static void open()
      Opens the nearest bank to the player.

      This method automatically finds the closest bank location and attempts to open it. If the bank is already open, no action is taken.

    • open

      public static void open(net.runelite.api.coords.WorldArea area, int offset)
      Opens a bank within the specified area with an offset.
      Parameters:
      area - the world area containing the bank
      offset - the offset to apply to the area boundaries
    • open

      public static void open(net.runelite.api.coords.WorldArea area, int offset, BooleanSupplier requirements)
      Opens a bank within the specified area with an offset and requirements check.
      Parameters:
      area - the world area containing the bank
      offset - the offset to apply to the area boundaries
      requirements - a supplier that returns true if requirements are met to open the bank
    • open

      public static void open(net.runelite.api.coords.WorldArea area)
      Opens a bank within the specified world area.
      Parameters:
      area - the world area containing the bank to open
    • open

      public static void open(BankLocation bankLocation)
      Opens a bank at the specified bank location.
      Parameters:
      bankLocation - the predefined bank location to open
    • getQuantityMode

      public static Bank.QuantityMode getQuantityMode()
      Gets the current withdraw quantity mode setting.
      Returns:
      the current Bank.QuantityMode
    • setQuantityMode

      public static void setQuantityMode(Bank.QuantityMode quantityMode)
      Sets the withdraw quantity mode for bank operations.
      Parameters:
      quantityMode - the quantity mode to set (ONE, FIVE, TEN, X, or ALL)
    • getFreeSlots

      public static int getFreeSlots()
      Gets the number of free slots available in the bank.
      Returns:
      the number of free slots, or -1 if the bank is not open
    • getCapacity

      public static int getCapacity()
      Gets the total capacity of the bank.
      Returns:
      the maximum number of item stacks the bank can hold, or -1 if unavailable
    • getOccupiedSlots

      public static int getOccupiedSlots()
      Gets the number of occupied slots in the bank.
      Returns:
      the number of slots currently containing items, or -1 if unavailable
    • releasePlaceholders

      public static void releasePlaceholders()
      Releases all placeholders in the bank.

      This opens the settings menu if not already open, then triggers the release placeholders action.

    • toggleSettings

      public static void toggleSettings()
      Toggles the bank settings menu open or closed.
    • isSettingsOpen

      public static boolean isSettingsOpen()
      Checks if the bank settings menu is currently open.
      Returns:
      true if the settings menu is visible, false otherwise
    • depositInventory

      public static void depositInventory()
      Deposits all items from the player's inventory into the bank.
    • depositEquipment

      public static void depositEquipment()
      Deposits all equipped items into the bank.
    • emptyContainers

      public static void emptyContainers()
      Empties all containers (such as looting bag, seed box) into the bank.
    • isOpen

      public static boolean isOpen()
      Checks if the bank interface is currently open.
      Returns:
      true if the bank is open, false otherwise
    • isEmpty

      public static boolean isEmpty()
      Checks if the bank contains no items.
      Returns:
      true if the bank is empty, false otherwise
    • depositAll

      public static void depositAll(String... names)
      Deposits all items matching the specified names from inventory into the bank.
      Parameters:
      names - the item names to deposit
    • depositAll

      public static void depositAll(int... ids)
      Deposits all items matching the specified IDs from inventory into the bank.
      Parameters:
      ids - the item IDs to deposit
    • depositAll

      public static void depositAll(Predicate<? super IItem> filter)
      Deposits all items matching the filter from inventory into the bank.
      Parameters:
      filter - the predicate to match items against
    • depositAllExcept

      public static void depositAllExcept(String... names)
      Deposits all items except those matching the specified names.
      Parameters:
      names - the item names to keep in inventory
    • depositAllExcept

      public static void depositAllExcept(int... ids)
      Deposits all items except those matching the specified IDs.
      Parameters:
      ids - the item IDs to keep in inventory
    • depositAllExcept

      public static void depositAllExcept(Predicate<? super IItem> filter)
      Deposits all items except those matching the filter.
      Parameters:
      filter - the predicate matching items to keep in inventory
    • deposit

      public static void deposit(String name, int amount)
      Deposits a specific amount of an item by name.
      Parameters:
      name - the name of the item to deposit
      amount - the quantity to deposit
    • deposit

      public static void deposit(int id, int amount)
      Deposits a specific amount of an item by ID.
      Parameters:
      id - the ID of the item to deposit
      amount - the quantity to deposit
    • deposit

      public static void deposit(Predicate<? super IItem> filter, int amount)
      Deposits a specific amount of items matching the filter.
      Parameters:
      filter - the predicate to match items against
      amount - the quantity to deposit
    • withdrawAll

      public static void withdrawAll(String name)
      Withdraws all of an item by name from the bank.
      Parameters:
      name - the name of the item to withdraw
    • withdrawAll

      public static void withdrawAll(String name, WithdrawMode withdrawMode)
      Withdraws all of an item by name with a specific withdraw mode.
      Parameters:
      name - the name of the item to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • withdrawAll

      public static void withdrawAll(int id)
      Withdraws all of an item by ID from the bank.
      Parameters:
      id - the ID of the item to withdraw
    • withdrawAll

      public static void withdrawAll(int id, WithdrawMode withdrawMode)
      Withdraws all of an item by ID with a specific withdraw mode.
      Parameters:
      id - the ID of the item to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • withdrawAll

      public static void withdrawAll(Predicate<IItem> filter)
      Withdraws all items matching the filter from the bank.
      Parameters:
      filter - the predicate to match items against
    • withdrawAll

      public static void withdrawAll(Predicate<IItem> filter, WithdrawMode withdrawMode)
      Withdraws all items matching the filter with a specific withdraw mode.
      Parameters:
      filter - the predicate to match items against
      withdrawMode - whether to withdraw as noted or as item
    • withdraw

      public static void withdraw(String name, int amount)
      Withdraws a specific amount of an item by name from the bank.
      Parameters:
      name - the name of the item to withdraw
      amount - the quantity to withdraw
    • withdraw

      public static void withdraw(String name, int amount, WithdrawMode withdrawMode)
      Withdraws a specific amount of an item by name with a specific withdraw mode.
      Parameters:
      name - the name of the item to withdraw
      amount - the quantity to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • withdraw

      public static void withdraw(int id, int amount)
      Withdraws a specific amount of an item by ID from the bank.
      Parameters:
      id - the ID of the item to withdraw
      amount - the quantity to withdraw
    • withdraw

      public static void withdraw(int id, int amount, WithdrawMode withdrawMode)
      Withdraws a specific amount of an item by ID with a specific withdraw mode.
      Parameters:
      id - the ID of the item to withdraw
      amount - the quantity to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • withdraw

      public static void withdraw(Predicate<IItem> filter, int amount)
      Withdraws a specific amount of items matching the filter from the bank.
      Parameters:
      filter - the predicate to match items against
      amount - the quantity to withdraw
    • withdraw

      public static void withdraw(Predicate<IItem> filter, int amount, WithdrawMode withdrawMode)
      Withdraws a specific amount of items matching the filter with a specific withdraw mode.
      Parameters:
      filter - the predicate to match items against
      amount - the quantity to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • quickWithdraw

      public static void quickWithdraw(String name, int amount)
      Quickly withdraws a specific amount of an item by name using optimized interactions.
      Parameters:
      name - the name of the item to withdraw
      amount - the quantity to withdraw
    • quickWithdraw

      public static void quickWithdraw(String name, int amount, WithdrawMode withdrawMode)
      Quickly withdraws a specific amount of an item by name with a specific withdraw mode.
      Parameters:
      name - the name of the item to withdraw
      amount - the quantity to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • quickWithdraw

      public static void quickWithdraw(int id, int amount)
      Quickly withdraws a specific amount of an item by ID using optimized interactions.
      Parameters:
      id - the ID of the item to withdraw
      amount - the quantity to withdraw
    • quickWithdraw

      public static void quickWithdraw(int id, int amount, WithdrawMode withdrawMode)
      Quickly withdraws a specific amount of an item by ID with a specific withdraw mode.
      Parameters:
      id - the ID of the item to withdraw
      amount - the quantity to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • quickWithdraw

      public static void quickWithdraw(Predicate<IItem> filter, int amount)
      Quickly withdraws a specific amount of items matching the filter using optimized interactions.
      Parameters:
      filter - the predicate to match items against
      amount - the quantity to withdraw
    • quickWithdraw

      public static void quickWithdraw(Predicate<IItem> filter, int amount, WithdrawMode withdrawMode)
      Quickly withdraws a specific amount of items matching the filter with a specific withdraw mode.
      Parameters:
      filter - the predicate to match items against
      amount - the quantity to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • quickDeposit

      public static void quickDeposit(String name, int amount)
      Quickly deposits a specific amount of an item by name using optimized interactions.
      Parameters:
      name - the name of the item to deposit
      amount - the quantity to deposit
    • quickDeposit

      public static void quickDeposit(int id, int amount)
      Quickly deposits a specific amount of an item by ID using optimized interactions.
      Parameters:
      id - the ID of the item to deposit
      amount - the quantity to deposit
    • quickDeposit

      public static void quickDeposit(Predicate<IItem> filter, int amount)
      Quickly deposits a specific amount of items matching the filter using optimized interactions.
      Parameters:
      filter - the predicate to match items against
      amount - the quantity to deposit
    • withdrawLastQuantity

      public static void withdrawLastQuantity(String name)
      Withdraws an item using the last used quantity setting.
      Parameters:
      name - the name of the item to withdraw
    • withdrawLastQuantity

      public static void withdrawLastQuantity(String name, WithdrawMode withdrawMode)
      Withdraws an item using the last used quantity setting with a specific withdraw mode.
      Parameters:
      name - the name of the item to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • withdrawLastQuantity

      public static void withdrawLastQuantity(int id)
      Withdraws an item using the last used quantity setting.
      Parameters:
      id - the ID of the item to withdraw
    • withdrawLastQuantity

      public static void withdrawLastQuantity(int id, WithdrawMode withdrawMode)
      Withdraws an item using the last used quantity setting with a specific withdraw mode.
      Parameters:
      id - the ID of the item to withdraw
      withdrawMode - whether to withdraw as noted or as item
    • withdrawLastQuantity

      public static void withdrawLastQuantity(Predicate<IItem> filter)
      Withdraws items matching the filter using the last used quantity setting.
      Parameters:
      filter - the predicate to match items against
    • withdrawLastQuantity

      public static void withdrawLastQuantity(Predicate<IItem> filter, WithdrawMode withdrawMode)
      Withdraws items matching the filter using the last used quantity setting with a specific withdraw mode.
      Parameters:
      filter - the predicate to match items against
      withdrawMode - whether to withdraw as noted or as item
    • setWithdrawMode

      public static void setWithdrawMode(boolean noted)
      Sets whether items should be withdrawn as notes or as regular items.
      Parameters:
      noted - true to withdraw items as notes, false for regular items
    • isNotedWithdrawMode

      public static boolean isNotedWithdrawMode()
      Checks if the current withdraw mode is set to noted.
      Returns:
      true if withdrawing as notes, false if withdrawing as items
    • getAll

      public static List<IBankItem> getAll(Predicate<? super IItem> filter)
      Gets all items in the bank matching the specified filter.
      Parameters:
      filter - the predicate to match items against
      Returns:
      a list of matching bank items
    • getAll

      public static List<IBankItem> getAll()
      Gets all items currently in the bank.
      Returns:
      a list of all bank items
    • getAll

      public static List<IBankItem> getAll(int... ids)
      Gets all items in the bank matching any of the specified IDs.
      Parameters:
      ids - the item IDs to search for
      Returns:
      a list of matching bank items
    • getAll

      public static List<IBankItem> getAll(String... names)
      Gets all items in the bank matching any of the specified names.
      Parameters:
      names - the item names to search for
      Returns:
      a list of matching bank items
    • get

      public static IBankItem get(int slot)
      Gets the bank item at the specified slot.
      Parameters:
      slot - the slot index (0-based)
      Returns:
      the bank item at the slot, or null if empty
    • getFirst

      public static IBankItem getFirst(Predicate<? super IItem> filter)
      Gets the first item in the bank matching the specified filter.
      Parameters:
      filter - the predicate to match items against
      Returns:
      the first matching bank item, or null if none found
    • getFirst

      public static IBankItem getFirst(int... ids)
      Gets the first item in the bank matching any of the specified IDs.
      Parameters:
      ids - the item IDs to search for
      Returns:
      the first matching bank item, or null if none found
    • getFirst

      public static IBankItem getFirst(String... names)
      Gets the first item in the bank matching any of the specified names.
      Parameters:
      names - the item names to search for
      Returns:
      the first matching bank item, or null if none found
    • getLast

      public static IBankItem getLast(Predicate<? super IItem> filter)
      Gets the last item in the bank matching the specified filter.
      Parameters:
      filter - the predicate to match items against
      Returns:
      the last matching bank item, or null if none found
    • getLast

      public static IBankItem getLast(int... ids)
      Gets the last item in the bank matching any of the specified IDs.
      Parameters:
      ids - the item IDs to search for
      Returns:
      the last matching bank item, or null if none found
    • getLast

      public static IBankItem getLast(String... names)
      Gets the last item in the bank matching any of the specified names.
      Parameters:
      names - the item names to search for
      Returns:
      the last matching bank item, or null if none found
    • contains

      public static boolean contains(Predicate<? super IItem> filter)
      Checks if the bank contains any item matching the specified filter.
      Parameters:
      filter - the predicate to match items against
      Returns:
      true if at least one matching item exists, false otherwise
    • contains

      public static boolean contains(int... id)
      Checks if the bank contains any item matching any of the specified IDs.
      Parameters:
      id - the item IDs to search for
      Returns:
      true if at least one matching item exists, false otherwise
    • contains

      public static boolean contains(String... name)
      Checks if the bank contains any item matching any of the specified names.
      Parameters:
      name - the item names to search for
      Returns:
      true if at least one matching item exists, false otherwise
    • containsAll

      public static boolean containsAll(int... ids)
      Checks if the bank contains all items with the specified IDs.
      Parameters:
      ids - the item IDs that must all be present
      Returns:
      true if all items are present, false if any are missing
    • containsAll

      public static boolean containsAll(String... names)
      Checks if the bank contains all items with the specified names.
      Parameters:
      names - the item names that must all be present
      Returns:
      true if all items are present, false if any are missing
    • getCount

      public static int getCount(boolean stacks, Predicate<IItem> filter)
      Counts items in the bank matching the filter.
      Parameters:
      stacks - if true, counts the total quantity of stacked items; if false, counts number of stacks
      filter - the predicate to match items against
      Returns:
      the count of matching items
    • getCount

      public static int getCount(boolean stacks, int... ids)
      Counts items in the bank matching any of the specified IDs.
      Parameters:
      stacks - if true, counts the total quantity of stacked items; if false, counts number of stacks
      ids - the item IDs to count
      Returns:
      the count of matching items
    • getCount

      public static int getCount(boolean stacks, String... names)
      Counts items in the bank matching any of the specified names.
      Parameters:
      stacks - if true, counts the total quantity of stacked items; if false, counts number of stacks
      names - the item names to count
      Returns:
      the count of matching items
    • getCount

      public static int getCount(Predicate<IItem> filter)
      Counts the number of item stacks matching the filter.
      Parameters:
      filter - the predicate to match items against
      Returns:
      the number of matching item stacks
    • getCount

      public static int getCount(int... ids)
      Counts the number of item stacks matching any of the specified IDs.
      Parameters:
      ids - the item IDs to count
      Returns:
      the number of matching item stacks
    • getCount

      public static int getCount(String... names)
      Counts the number of item stacks matching any of the specified names.
      Parameters:
      names - the item names to count
      Returns:
      the number of matching item stacks
    • getTabs

      public static List<IWidget> getTabs()
      Gets all bank tab widgets.
      Returns:
      a list of widgets representing bank tabs
    • hasTabs

      public static boolean hasTabs()
      Checks if the bank has any custom tabs configured.
      Returns:
      true if at least one custom tab exists, false otherwise
    • collapseTabs

      public static void collapseTabs()
      Collapses all bank tabs, moving their items to the main tab.
    • collapseTab

      public static void collapseTab(int index)
      Collapses a specific bank tab by index, moving its items to the main tab.
      Parameters:
      index - the tab index to collapse (0-based, excluding main tab)
    • isMainTabOpen

      public static boolean isMainTabOpen()
      Checks if the main bank tab is currently selected.
      Returns:
      true if the main tab is open, false otherwise
    • isTabOpen

      public static boolean isTabOpen(int index)
      Checks if a specific bank tab is currently selected.
      Parameters:
      index - the tab index to check (0-based, excluding main tab)
      Returns:
      true if the specified tab is open, false otherwise
    • openMainTab

      public static void openMainTab()
      Opens the main bank tab, showing all items.
    • openTab

      public static void openTab(int index)
      Opens a specific bank tab by index.
      Parameters:
      index - the tab index to open (0-based, excluding main tab)
    • isPinScreenOpen

      public static boolean isPinScreenOpen()
      Checks if the bank PIN entry screen is currently displayed.
      Returns:
      true if the PIN screen is open, false otherwise
    • close

      public static void close()
      Closes the bank interface.