Package com.epicbot.api.shared.methods
Interface IInventoryAPI
-
public interface IInventoryAPI
-
-
Field Summary
Fields Modifier and Type Field Description static int
SIZE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
contains(int... ids)
boolean
contains(java.lang.String... names)
boolean
contains(java.util.function.Predicate<Item> filter)
boolean
containsAll(int... ids)
boolean
containsAll(java.lang.String... names)
boolean
deselectItem()
boolean
dropAll()
boolean
dropAll(int... ids)
boolean
dropAll(java.lang.String... names)
boolean
dropAll(java.util.function.Predicate<Item> filter)
boolean
dropAllExcept(int... ids)
boolean
dropAllExcept(java.lang.String... names)
boolean
dropAllExcept(java.util.function.Predicate<Item> filter)
boolean
dropItem(int... ids)
boolean
dropItem(ItemWidget item)
boolean
dropItem(java.lang.String... names)
boolean
dropItem(java.util.function.Predicate<Item> filter)
int
getCount()
int
getCount(boolean includeStackables)
int
getCount(boolean includeStackables, int... ids)
int
getCount(boolean includeStackables, java.lang.String... names)
int
getCount(boolean includeStackables, java.util.function.Predicate<Item> filter)
int
getCount(int... ids)
int
getCount(java.lang.String... names)
int
getCount(java.util.function.Predicate<Item> filter)
int
getEmptySlotCount()
ItemWidget
getItem(int... ids)
ItemWidget
getItem(java.lang.String... names)
ItemWidget
getItem(java.util.function.Predicate<Item> filter)
ItemWidget
getItemAt(int index)
java.util.List<ItemWidget>
getItems()
java.util.List<ItemWidget>
getItems(int... ids)
java.util.List<ItemWidget>
getItems(java.lang.String... names)
java.util.List<ItemWidget>
getItems(java.util.function.Predicate<Item> filter)
ItemWidget
getItemWidget(int index)
Gets the item widget at the given index.ItemWidget
getSelectedItem()
int
getSelectedItemId()
int
getSelectedItemIndex()
java.lang.String
getSelectedItemName()
boolean
interactItem(java.lang.String action, int... ids)
boolean
interactItem(java.lang.String action, java.lang.String... names)
boolean
interactItem(java.lang.String action, java.util.function.Predicate<Item> filter)
boolean
isEmpty()
boolean
isFull()
boolean
isItemSelected()
boolean
moveItem(int fromIndex, int toIndex)
Move the item to the given slot.default boolean
moveItem(ItemWidget item, int slotIndex)
Move the item to the given slot.boolean
onlyContains(int... ids)
boolean
onlyContains(java.lang.String... names)
boolean
onlyContains(java.util.function.Predicate<Item> filter)
boolean
selectItem(int... ids)
boolean
selectItem(java.lang.String... names)
boolean
selectItem(java.util.function.Predicate<Item> filter)
-
-
-
Field Detail
-
SIZE
static final int SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getItemWidget
ItemWidget getItemWidget(int index)
Gets the item widget at the given index. Also works for slots with no item.- Parameters:
index
- the slot index- Returns:
- the item widget or null if the index is invalid
-
getItems
java.util.List<ItemWidget> getItems()
-
getItems
java.util.List<ItemWidget> getItems(int... ids)
-
getItems
java.util.List<ItemWidget> getItems(java.lang.String... names)
-
getItems
java.util.List<ItemWidget> getItems(java.util.function.Predicate<Item> filter)
-
getItem
ItemWidget getItem(int... ids)
-
getItem
ItemWidget getItem(java.lang.String... names)
-
getItem
ItemWidget getItem(java.util.function.Predicate<Item> filter)
-
getItemAt
ItemWidget getItemAt(int index)
-
isItemSelected
boolean isItemSelected()
-
getSelectedItemId
int getSelectedItemId()
-
getSelectedItemName
java.lang.String getSelectedItemName()
-
getSelectedItemIndex
int getSelectedItemIndex()
-
getSelectedItem
ItemWidget getSelectedItem()
-
getCount
int getCount()
-
getCount
int getCount(int... ids)
-
getCount
int getCount(java.lang.String... names)
-
getCount
int getCount(boolean includeStackables, int... ids)
-
getCount
int getCount(boolean includeStackables, java.lang.String... names)
-
getCount
int getCount(boolean includeStackables)
-
getCount
int getCount(java.util.function.Predicate<Item> filter)
-
getCount
int getCount(boolean includeStackables, java.util.function.Predicate<Item> filter)
-
isFull
boolean isFull()
-
isEmpty
boolean isEmpty()
-
getEmptySlotCount
int getEmptySlotCount()
-
contains
boolean contains(int... ids)
-
contains
boolean contains(java.lang.String... names)
-
contains
boolean contains(java.util.function.Predicate<Item> filter)
-
containsAll
boolean containsAll(int... ids)
-
containsAll
boolean containsAll(java.lang.String... names)
-
onlyContains
boolean onlyContains(int... ids)
-
onlyContains
boolean onlyContains(java.lang.String... names)
-
onlyContains
boolean onlyContains(java.util.function.Predicate<Item> filter)
-
selectItem
boolean selectItem(int... ids)
-
selectItem
boolean selectItem(java.lang.String... names)
-
selectItem
boolean selectItem(java.util.function.Predicate<Item> filter)
-
dropItem
boolean dropItem(int... ids)
-
dropItem
boolean dropItem(java.lang.String... names)
-
dropItem
boolean dropItem(java.util.function.Predicate<Item> filter)
-
dropItem
boolean dropItem(ItemWidget item)
-
dropAll
boolean dropAll()
-
dropAll
boolean dropAll(int... ids)
-
dropAll
boolean dropAll(java.lang.String... names)
-
dropAll
boolean dropAll(java.util.function.Predicate<Item> filter)
-
dropAllExcept
boolean dropAllExcept(int... ids)
-
dropAllExcept
boolean dropAllExcept(java.lang.String... names)
-
dropAllExcept
boolean dropAllExcept(java.util.function.Predicate<Item> filter)
-
interactItem
boolean interactItem(java.lang.String action, int... ids)
-
interactItem
boolean interactItem(java.lang.String action, java.lang.String... names)
-
interactItem
boolean interactItem(java.lang.String action, java.util.function.Predicate<Item> filter)
-
deselectItem
boolean deselectItem()
-
moveItem
default boolean moveItem(ItemWidget item, int slotIndex)
Move the item to the given slot.- Parameters:
item
- the item to moveslotIndex
- the index of the target slot- Returns:
- true if successful, false otherwise
-
moveItem
boolean moveItem(int fromIndex, int toIndex)
Move the item to the given slot.- Parameters:
fromIndex
- the slot index of the item to movetoIndex
- the index of the target slot- Returns:
- true if successful, false otherwise
-
-