Package net.storm.sdk.widgets
Class BankWornItems
java.lang.Object
net.storm.sdk.widgets.BankWornItems
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose()Closes the worn items panel in the bank interface.static BankWornItemfromSlot(EquipmentSlot slot) Retrieves the item from a specific equipment slot.static BankWornItemgetAmmo()Retrieves the item currently worn in the ammo slot.static BankWornItemRetrieves the item currently worn in the amulet slot.static BankWornItemgetBody()Retrieves the item currently worn in the body slot.static BankWornItemgetBoots()Retrieves the item currently worn in the boots slot.static BankWornItemgetCape()Retrieves the item currently worn in the cape slot.static BankWornItemRetrieves the item currently worn in the gloves slot.static BankWornItemgetHead()Retrieves the item currently worn in the head slot.static BankWornItemgetLegs()Retrieves the item currently worn in the legs slot.static BankWornItemgetRing()Retrieves the item currently worn in the ring slot.static BankWornItemRetrieves the item currently worn in the shield slot.static BankWornItemRetrieves the item currently worn in the weapon slot.static booleanisOpen()Checks whether the bank worn items panel is currently open.static voidopen()Opens the worn items panel in the bank interface.
-
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
Retrieves the item currently worn in the head slot.- Returns:
- the head slot item, or null if the panel is not open
-
getCape
Retrieves the item currently worn in the cape slot.- Returns:
- the cape slot item, or null if the panel is not open
-
getAmulet
Retrieves the item currently worn in the amulet slot.- Returns:
- the amulet slot item, or null if the panel is not open
-
getWeapon
Retrieves the item currently worn in the weapon slot.- Returns:
- the weapon slot item, or null if the panel is not open
-
getBody
Retrieves the item currently worn in the body slot.- Returns:
- the body slot item, or null if the panel is not open
-
getShield
Retrieves the item currently worn in the shield slot.- Returns:
- the shield slot item, or null if the panel is not open
-
getLegs
Retrieves the item currently worn in the legs slot.- Returns:
- the legs slot item, or null if the panel is not open
-
getGloves
Retrieves the item currently worn in the gloves slot.- Returns:
- the gloves slot item, or null if the panel is not open
-
getBoots
Retrieves the item currently worn in the boots slot.- Returns:
- the boots slot item, or null if the panel is not open
-
getRing
Retrieves the item currently worn in the ring slot.- Returns:
- the ring slot item, or null if the panel is not open
-
getAmmo
Retrieves the item currently worn in the ammo slot.- Returns:
- the ammo slot item, or null if the panel is not open
-
fromSlot
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
-