public class Inventory extends ItemContainer
| Modifier and Type | Field and Description |
|---|---|
static int |
BANK_WIDGET_ID |
static int |
GRAND_EXCHANGE_WIDGET_ID |
static int |
INVENTORY_WIDGET_ID |
static int |
SHOP_WIDGET_ID |
static int |
SIZE |
static int |
TRADING_WIDGET_ID |
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 |
|---|
Inventory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deselectItem()
Deselects an item if an item is selected by clicking on the inventory
tab.
|
boolean |
drop(int... ids)
Drops the first item matched with the specified ids.
|
boolean |
drop(java.lang.String... names)
Drops the first item matched with the specified names.
|
boolean |
dropAll()
Drops all the items.
|
boolean |
dropAll(Filter<Item>... filters)
Drops all the items in the filters.
|
boolean |
dropAll(int... ids)
Drops all the items matched with the specified ids.
|
boolean |
dropAll(java.util.List<Item> items)
Drops all the items in the list.
|
boolean |
dropAll(java.lang.String... names)
Drops all the items matched with the specified ids.
|
boolean |
dropAllExcept(Filter<Item>... filters)
Drops all the items in the inventory excluding items within the filters passed.
|
boolean |
dropAllExcept(int... ids)
Drops all the items in the inventory excluding items with the ids passed.
|
boolean |
dropAllExcept(java.util.List<Item> items)
Drops all the items in the inventory excluding items in the list.
|
boolean |
dropAllExcept(java.lang.String... names)
Drops all the items in the inventory excluding items with the names passed.
|
boolean |
dropForFilter(Filter<Item>... filters)
Drops the first item matched by the filters.
|
boolean |
dropForNameThatContains(java.lang.String... names)
Drops the first item matched with the specified names.
|
int |
getCapacity() |
int |
getEmptySlotCount()
Deprecated.
|
int |
getInterfaceChildId()
Gets the interface child id that this item container represents.
|
int |
getInterfaceId()
Gets the interface id that this item container represents.
|
Item[] |
getItems()
Gets the array of items stored in this container in order.
|
MouseDestination |
getMouseDestination(int slot)
Gets the mouse destination for the specified slot.
|
int |
getSelectedItemId()
Returns the id of the item selected.
|
int |
getSelectedItemIndex()
Returns the index of the item selected.
|
java.lang.String |
getSelectedItemName()
Returns the name of the item selected.
|
java.awt.Rectangle |
getSlotBoundingBox(int slot)
Gets the bounding box for the given item slot
|
void |
initializeModule() |
boolean |
isEmptyExcept(int... ids)
Checks if your inventory is empty, ignoring items that have an id from the list of ids.
|
boolean |
isEmptyExcept(java.lang.String... strings)
Checks if your inventory is empty, ignoring items that have a name from the list of strings.
|
boolean |
isItemSelected()
Returns whether an item in your inventory is selected.
|
contains, contains, contains, contains, containsAll, containsAll, filter, getAmount, getAmount, getAmount, getEmptySlots, getItem, getItem, getItem, getItemInSlot, getSlot, getSlot, getSlot, getSlot, getSlot, getSlotForNameThatContains, hover, interact, interact, interact, interact, interactWithNameThatContains, inverseFilter, isEmpty, isFull, onlyContains, onlyContains, onlyContainsexchangeContext, 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, warnpublic static final int SIZE
public static final int INVENTORY_WIDGET_ID
public static final int BANK_WIDGET_ID
public static final int TRADING_WIDGET_ID
public static final int GRAND_EXCHANGE_WIDGET_ID
public static final int SHOP_WIDGET_ID
public void initializeModule()
initializeModule in class APIpublic int getInterfaceId()
ItemContainergetInterfaceId in class ItemContainerpublic int getInterfaceChildId()
ItemContainergetInterfaceChildId in class ItemContainerpublic MouseDestination getMouseDestination(int slot)
ItemContainerslot - The slot.public int getCapacity()
getCapacity in class ItemContainerpublic Item[] getItems()
ItemContainerSome entries may be null as place-markers.
getItems in class ItemContainer@Deprecated public int getEmptySlotCount()
ItemContainer.getEmptySlots()public boolean drop(int... ids)
ids - The ids to match.public boolean drop(java.lang.String... names)
names - The names to match.public boolean dropForNameThatContains(java.lang.String... names)
names - The names to match.@SafeVarargs public final boolean dropForFilter(Filter<Item>... filters)
filters - The filters to find a match.public boolean dropAll()
public boolean dropAll(int... ids)
ids - The ids to match.public boolean dropAll(java.lang.String... names)
names - The names to match.public boolean dropAll(java.util.List<Item> items)
items - The items to be dropped.@SafeVarargs public final boolean dropAll(Filter<Item>... filters)
filters - The filters.public boolean dropAllExcept(int... ids)
ids - Item ids to ignore when dropping.public boolean dropAllExcept(java.lang.String... names)
names - Item names to ignore when dropping.public boolean dropAllExcept(java.util.List<Item> items)
items - The list.@SafeVarargs public final boolean dropAllExcept(Filter<Item>... filters)
filters - The filters.public boolean isItemSelected()
public java.lang.String getSelectedItemName()
public int getSelectedItemIndex()
public int getSelectedItemId()
public boolean deselectItem()
public boolean isEmptyExcept(java.lang.String... strings)
strings - The strings you wish to ignore in determining if your inventory is empty.public boolean isEmptyExcept(int... ids)
ids - The ids you wish to ignore in determining if your inventory is empty.public java.awt.Rectangle getSlotBoundingBox(int slot)
slot - The slot to get the bounding box of