public class Equipment extends ItemContainer
Modifier and Type | Field and Description |
---|---|
static int |
INTERFACE_CHILD_ID |
static int |
ITEM_CONTAINER_ID |
static int |
MAIN_INTERFACE_ROOT_ID |
static int |
SIZE |
bank, bot, camera, chatbox, client, colorPicker, combat, configs, depositBox, dialogues, diaries, display, doorHandler, equipment, experienceTracker, favour, grandExchange, graphicObjects, groundItems, hintArrow, inventory, keyboard, logger, logoutTab, magic, map, menu, mouse, npcs, objects, players, prayer, projectiles, quests, settings, skills, store, tabs, trade, walking, widgets, worlds
Constructor and Description |
---|
Equipment() |
Modifier and Type | Method and Description |
---|---|
boolean |
equip(EquipmentSlot slot,
Filter<Item> filter)
Equips the first item returned by the specified filter into the specified slot.
|
boolean |
equip(EquipmentSlot slot,
int id)
Equips an item with the specified item id in the specified slot.
|
boolean |
equip(EquipmentSlot slot,
java.lang.String name)
Equips an item with the specified item name in the specified slot.
|
boolean |
equip(int slot,
java.lang.String action)
Equips an item in the specified inventory slot with the specified action.
|
boolean |
equipForNameThatContains(EquipmentSlot slot,
java.lang.String... strings)
Equips the first item found that contains any of the specified strings in to the specified slot.
|
int |
getCapacity() |
EquipmentSlot |
getForNameThatContains(java.lang.String... strings)
Gets the slot which contains an item which its name contains any of the specified strings.
|
int |
getInterfaceChildId()
Gets the interface child id that this item container represents.
|
int |
getInterfaceId()
Gets the interface id that this item container represents.
|
Item |
getItemInSlot(int slot)
Gets the item in the specified slot.
|
Item[] |
getItems()
Gets the array of items stored in this container in order.
|
EquipmentSlot |
getSlotForItemIds(int... ids)
Gets the slot which contains an item which its id equals any of the specified ids.
|
void |
initializeModule() |
boolean |
interact(EquipmentSlot slot,
java.lang.String... actions)
Interacts with the slot specified.
|
boolean |
interact(int slot,
java.lang.String... actions)
Interacts with the slot specified.
|
boolean |
isWearingItem(EquipmentSlot slot)
Checks if you are wearing an item in the specified equipment slot.
|
boolean |
isWearingItem(EquipmentSlot slot,
Filter<Item> filter)
Checks if the specified slot contains any of the items returned by the filter.
|
boolean |
isWearingItem(EquipmentSlot slot,
int id)
Checks if the specified slot contains an item with the specified item id.
|
boolean |
isWearingItem(EquipmentSlot slot,
Item item)
Checks if the specified slot contains an item with the id of the specified item.
|
boolean |
isWearingItem(EquipmentSlot slot,
java.lang.String name)
Checks if the specified slot contains an item with the specified item name.
|
boolean |
isWearingItemThatContains(EquipmentSlot slot,
java.lang.String... strings)
Checks if the specified slot contains an items which its name contains any of the specified
strings.
|
boolean |
isWieldingWeapon(Filter<Item> filter)
Checks if the weapon slot contains any of the items returned by the filter.
|
boolean |
isWieldingWeapon(int id)
Checks if the weapon slot contains an item with the specified item id.
|
boolean |
isWieldingWeapon(java.lang.String name)
Checks if the weapon slot contains an item with the specified item name.
|
boolean |
isWieldingWeaponThatContains(java.lang.String... strings)
Checks if the weapon slot contains an item which its name contains any of the
specified strings.
|
boolean |
openTab()
Opens the equipment tab.
|
boolean |
unequip(EquipmentSlot slot)
Unequips the item found in the specified slot.
|
boolean |
unequip(EquipmentSlot slot,
Filter<Item> filter)
Unequips the first item match returned by the filter that sits in the specified slot.
|
boolean |
unequip(EquipmentSlot slot,
int id)
Unequips an item with the specified item id from the specified slot.
|
boolean |
unequip(EquipmentSlot slot,
java.lang.String name)
Unequips an item with the specified item name from the specified slot.
|
boolean |
unequip(Filter<Item> filter)
Unequips the first item found by the filter.
|
contains, contains, contains, contains, containsAll, containsAll, filter, getAmount, getAmount, getAmount, getEmptySlots, getItem, getItem, getItem, getSlot, getSlot, getSlot, getSlot, getSlot, getSlotForNameThatContains, hover, interact, interact, interact, interactWithNameThatContains, inverseFilter, isEmpty, isFull, onlyContains, onlyContains, onlyContains
exchangeContext, execute, getBank, getBot, getCamera, getChatbox, getClient, getColorPicker, getCombat, getConfigs, getDepositBox, getDialogues, getDiaries, getDisplay, getDoorHandler, getEquipment, getExperienceTracker, getFavour, getGrandExchange, getGraphicObjects, getGroundItems, getHintArrow, getInventory, getKeyboard, getLogoutTab, getMagic, getMap, getMenuAPI, getMouse, getNpcs, getObjects, getPlayers, getPrayer, getProjectiles, getQuests, getSettings, getSkills, getStore, getTabs, getTrade, getWalking, getWidgets, getWorlds, gRandom, gRandom, gRandom, initializeContext, log, log, myPlayer, myPosition, random, random, sleep, stripFormatting, warn
public static final int INTERFACE_CHILD_ID
public static final int ITEM_CONTAINER_ID
public static final int SIZE
public static final int MAIN_INTERFACE_ROOT_ID
public void initializeModule()
initializeModule
in class API
public int getInterfaceId()
ItemContainer
getInterfaceId
in class ItemContainer
public int getInterfaceChildId()
ItemContainer
getInterfaceChildId
in class ItemContainer
public int getCapacity()
getCapacity
in class ItemContainer
public Item[] getItems()
getItems
in class ItemContainer
public boolean isWearingItem(EquipmentSlot slot)
slot
- The specified slot.public boolean isWearingItem(EquipmentSlot slot, Filter<Item> filter)
slot
- The slot to check.filter
- The filter.public boolean isWearingItem(EquipmentSlot slot, int id)
slot
- The slot to check.id
- The item id.public boolean isWearingItem(EquipmentSlot slot, java.lang.String name)
slot
- The slot to check.name
- The item id.public boolean isWearingItem(EquipmentSlot slot, Item item)
slot
- The slot to check.item
- The item which its id to check for.public boolean isWearingItemThatContains(EquipmentSlot slot, java.lang.String... strings)
slot
- The slot to check.strings
- The strings to check the item for.public boolean isWieldingWeapon(Filter<Item> filter)
filter
- The filter.public boolean isWieldingWeapon(int id)
id
- The item id.public boolean isWieldingWeapon(java.lang.String name)
name
- The item name.public boolean isWieldingWeaponThatContains(java.lang.String... strings)
strings
- The string to check the name for.public boolean equip(EquipmentSlot slot, Filter<Item> filter)
slot
- The slot the item should go in.filter
- The filter.public boolean equip(EquipmentSlot slot, int id)
slot
- The slot the item should go in.id
- The id of the item to equip.public boolean equip(EquipmentSlot slot, java.lang.String name)
slot
- The slot the item should go in.name
- The name of the item to equip.public boolean equipForNameThatContains(EquipmentSlot slot, java.lang.String... strings)
slot
- The slot the item should go in.strings
- The strings of which at least one needs to be contained in the item its name.public boolean equip(int slot, java.lang.String action)
slot
- The inventory slot.action
- The action.public boolean unequip(Filter<Item> filter)
filter
- The filter.public boolean unequip(EquipmentSlot slot)
slot
- The equipment slot to unequip from.public boolean unequip(EquipmentSlot slot, Filter<Item> filter)
slot
- The slot.filter
- The filter.public boolean unequip(EquipmentSlot slot, int id)
slot
- The slot.id
- The item id to match.public boolean unequip(EquipmentSlot slot, java.lang.String name)
slot
- The slot.name
- The item name to match.public EquipmentSlot getForNameThatContains(java.lang.String... strings)
strings
- The strings to match.EquipmentSlot
.public EquipmentSlot getSlotForItemIds(int... ids)
ids
- The ids to match.EquipmentSlot
.public boolean openTab()
public Item getItemInSlot(int slot)
getItemInSlot
in class ItemContainer
slot
- The slot to get the item from.public boolean interact(int slot, java.lang.String... actions)
interact
in class ItemContainer
slot
- The slot to interact with.actions
- The action to interact with.public boolean interact(EquipmentSlot slot, java.lang.String... actions)
slot
- The EquipmentSlot to interact with.actions
- The action to interact with.