public abstract class ItemContainer extends API
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 |
---|
ItemContainer() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Filter<Item>... filters)
Determines whether or not this containers contains any of items specified by the filter(s).
|
boolean |
contains(int... ids)
Determines whether or not this container contains any of the specified ids.
|
boolean |
contains(java.util.List<Item> items)
Determines whether or not this containers contains any of the specified items.
|
boolean |
contains(java.lang.String... names)
Determines whether or not this container contains any of the specified names.
|
boolean |
containsAll(int... ids)
Checks whether or not this container contains all of the specified ids.
|
boolean |
containsAll(java.lang.String... names)
Checks whether or not this container contains all of the specified names.
|
java.util.List<Item> |
filter(Filter<Item>... filters)
Filters the item array with the specified filters.
|
long |
getAmount(Filter<Item>... filters)
Determines the amount of items of the container filtered by the specified filter(s).
|
long |
getAmount(int... ids)
Determines the amount of items of the specified ids are contained in this container.
|
long |
getAmount(java.lang.String... names)
Determines the amount of items of the specified ids are contained in this container.
|
int |
getCapacity() |
int |
getEmptySlots() |
abstract int |
getInterfaceChildId()
Gets the interface child id that this item container represents.
|
abstract int |
getInterfaceId()
Gets the interface id that this item container represents.
|
Item |
getItem(Filter<Item>... filter)
Gets the first item found after filtering the container with the specified filter.
|
Item |
getItem(int... ids)
Gets the first item with the specified ids
|
Item |
getItem(java.lang.String... names)
Gets the first item with the specified names
|
Item |
getItemInSlot(int slot)
Gets the item in the specified slot.
|
abstract Item[] |
getItems()
Gets the array of items stored in this container in order.
|
int |
getSlot(Filter<Item>... filter)
Gets the slot for the first item matched after filtering the container.
|
int |
getSlot(int... ids)
Gets the slot for the first item matched with the specified ids.
|
int |
getSlot(Item item)
Gets the slot for the specified item.
|
int |
getSlot(java.util.List<Item> items)
Gets the slot for the first item matched with the specified list.
|
int |
getSlot(java.lang.String... names)
Gets the slot for the first item matched with the specified ids.
|
int |
getSlotForNameThatContains(java.lang.String... strings)
Gets the slot for the first item matched that contains any of the given strings in its name.
|
boolean |
hover(int slot)
Hovers over the slot specified.
|
boolean |
interact(int slot,
java.lang.String... actions)
Interacts with the slot specified.
|
boolean |
interact(java.lang.String action,
Filter<Item>... filter)
Interacts with the first item matched.
|
boolean |
interact(java.lang.String action,
int... ids)
Interacts with the first item matched.
|
boolean |
interact(java.lang.String action,
java.lang.String... names)
Interacts with the first item matched.
|
boolean |
interactWithNameThatContains(java.lang.String action,
java.lang.String... strings)
Interacts with an item that contains any of the specified strings in their name.
|
java.util.List<Item> |
inverseFilter(Filter<Item>... filters)
Filters out the item array removing the specified filters.
|
boolean |
isEmpty()
Determines if this container is empty.
|
boolean |
isFull()
Determines if this container is full.
|
boolean |
onlyContains(Filter<Item>... filters)
Determines whether this container only exists out of the items specified by the filters.
|
boolean |
onlyContains(int... ids)
Determines whether this container only exists out of the items specified.
|
boolean |
onlyContains(java.lang.String... names)
Determines whether this container only exists out of the items specified.
|
initializeModule
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 abstract int getInterfaceId()
public abstract int getInterfaceChildId()
public abstract Item[] getItems()
Some entries may be null as place-markers.
public int getCapacity()
public int getEmptySlots()
public java.util.List<Item> filter(Filter<Item>... filters)
filters
- The filters.@SafeVarargs public final java.util.List<Item> inverseFilter(Filter<Item>... filters)
filters
- The filters.public Item getItemInSlot(int slot)
slot
- The slot to get the item from.@SafeVarargs public final Item getItem(Filter<Item>... filter)
filter
- The filter(s).public Item getItem(int... ids)
ids
- The ids to match.public Item getItem(java.lang.String... names)
names
- The names to match.@SafeVarargs public final int getSlot(Filter<Item>... filter)
filter
- The filter(s).public int getSlot(int... ids)
ids
- The ids to match.public int getSlot(java.lang.String... names)
names
- The names to match.public int getSlotForNameThatContains(java.lang.String... strings)
strings
- The strings to match.public int getSlot(java.util.List<Item> items)
items
- The items to match.public int getSlot(Item item)
Note: The item is matched based on id and amount only.
item
- The item to match.@SafeVarargs public final boolean contains(Filter<Item>... filters)
filters
- The filter(s).public boolean contains(int... ids)
ids
- The ids to match.public boolean contains(java.lang.String... names)
names
- The names to match.public boolean contains(java.util.List<Item> items)
items
- The items to match.public boolean containsAll(int... ids)
ids
- The ids to matchpublic boolean containsAll(java.lang.String... names)
names
- The names to matchpublic boolean isFull()
public boolean isEmpty()
@SafeVarargs public final long getAmount(Filter<Item>... filters)
filters
- The filter(s).public long getAmount(int... ids)
ids
- The ids to look for.public long getAmount(java.lang.String... names)
names
- The names to look for.@SafeVarargs public final boolean onlyContains(Filter<Item>... filters)
filters
- The filter(s).public boolean onlyContains(int... ids)
ids
- The item ids.public boolean onlyContains(java.lang.String... names)
names
- The item names.public boolean interactWithNameThatContains(java.lang.String action, java.lang.String... strings)
action
- The action to interact with, null to allow any action.strings
- The strings to match with item names.@SafeVarargs public final boolean interact(java.lang.String action, Filter<Item>... filter)
action
- The action to interact with.filter
- The filter to match items with.public boolean interact(java.lang.String action, int... ids)
action
- The action to interact with.ids
- The ids to match.public boolean interact(java.lang.String action, java.lang.String... names)
action
- The action to interact with.names
- The names to match.public boolean interact(int slot, java.lang.String... actions)
slot
- The slot to interact with.actions
- The action to interact with.public boolean hover(int slot)
slot
- The slot to hover over.