Class BankWornItems

java.lang.Object
net.storm.sdk.widgets.BankWornItems

public class BankWornItems extends Object
Provides utility methods for interacting with worn items while the bank is open.

This class allows access to equipment slots directly from the bank interface, enabling inspection and interaction with worn items without closing the bank. This is useful for managing gear loadouts and swapping equipment efficiently.

The bank worn items panel displays all equipment slots:

  • Head, Cape, Amulet
  • Weapon, Body, Shield
  • Legs, Gloves, Boots
  • Ring, Ammo

Example Usage:


 // Open the worn items panel in the bank
 if (!BankWornItems.isOpen()) {
     BankWornItems.open();
 }

 // Check what weapon is equipped
 BankWornItem weapon = BankWornItems.getWeapon();
 if (weapon != null && weapon.getItemId() != -1) {
     // Player has a weapon equipped
 }

 // Get item from a specific slot
 BankWornItem item = BankWornItems.fromSlot(EquipmentSlot.RING);

 // Close the worn items panel
 BankWornItems.close();
 
See Also:
  • Constructor Details

    • BankWornItems

      public BankWornItems()
  • Method Details

    • isOpen

      public static boolean isOpen()
      Checks whether the bank worn items panel is currently open.
      Returns:
      true if the worn items panel is visible, false otherwise
    • open

      public static void open()
      Opens the worn items panel in the bank interface.

      The bank must already be open for this to work.

    • close

      public static void close()
      Closes the worn items panel in the bank interface.
    • getHead

      public static BankWornItem getHead()
      Retrieves the item currently worn in the head slot.
      Returns:
      the head slot item, or null if the panel is not open
    • getCape

      public static BankWornItem getCape()
      Retrieves the item currently worn in the cape slot.
      Returns:
      the cape slot item, or null if the panel is not open
    • getAmulet

      public static BankWornItem getAmulet()
      Retrieves the item currently worn in the amulet slot.
      Returns:
      the amulet slot item, or null if the panel is not open
    • getWeapon

      public static BankWornItem getWeapon()
      Retrieves the item currently worn in the weapon slot.
      Returns:
      the weapon slot item, or null if the panel is not open
    • getBody

      public static BankWornItem getBody()
      Retrieves the item currently worn in the body slot.
      Returns:
      the body slot item, or null if the panel is not open
    • getShield

      public static BankWornItem getShield()
      Retrieves the item currently worn in the shield slot.
      Returns:
      the shield slot item, or null if the panel is not open
    • getLegs

      public static BankWornItem getLegs()
      Retrieves the item currently worn in the legs slot.
      Returns:
      the legs slot item, or null if the panel is not open
    • getGloves

      public static BankWornItem getGloves()
      Retrieves the item currently worn in the gloves slot.
      Returns:
      the gloves slot item, or null if the panel is not open
    • getBoots

      public static BankWornItem getBoots()
      Retrieves the item currently worn in the boots slot.
      Returns:
      the boots slot item, or null if the panel is not open
    • getRing

      public static BankWornItem getRing()
      Retrieves the item currently worn in the ring slot.
      Returns:
      the ring slot item, or null if the panel is not open
    • getAmmo

      public static BankWornItem getAmmo()
      Retrieves the item currently worn in the ammo slot.
      Returns:
      the ammo slot item, or null if the panel is not open
    • fromSlot

      public static BankWornItem fromSlot(EquipmentSlot slot)
      Retrieves the item from a specific equipment slot.
      Parameters:
      slot - the equipment slot to query
      Returns:
      the item in the specified slot, or null if the panel is not open