public interface IInventoryAPI
Modifier and Type | Field and Description |
---|---|
static int |
SIZE |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int... ids) |
boolean |
contains(java.util.function.Predicate<Item> filter) |
boolean |
contains(java.lang.String... names) |
boolean |
containsAll(int... ids) |
boolean |
containsAll(java.lang.String... names) |
boolean |
deselectItem() |
boolean |
dropAll() |
boolean |
dropAll(int... ids) |
boolean |
dropAll(java.util.function.Predicate<Item> filter) |
boolean |
dropAll(java.lang.String... names) |
boolean |
dropAllExcept(int... ids) |
boolean |
dropAllExcept(java.util.function.Predicate<Item> filter) |
boolean |
dropAllExcept(java.lang.String... names) |
boolean |
dropItem(int... ids) |
boolean |
dropItem(ItemWidget item) |
boolean |
dropItem(java.util.function.Predicate<Item> filter) |
boolean |
dropItem(java.lang.String... names) |
int |
getCount() |
int |
getCount(boolean includeStackables) |
int |
getCount(boolean includeStackables,
int... ids) |
int |
getCount(boolean includeStackables,
java.util.function.Predicate<Item> filter) |
int |
getCount(boolean includeStackables,
java.lang.String... names) |
int |
getCount(int... ids) |
int |
getCount(java.util.function.Predicate<Item> filter) |
int |
getCount(java.lang.String... names) |
ItemWidget |
getItem(int... ids) |
ItemWidget |
getItem(java.util.function.Predicate<Item> filter) |
ItemWidget |
getItem(java.lang.String... names) |
ItemWidget |
getItemAt(int index) |
java.util.List<ItemWidget> |
getItems() |
java.util.List<ItemWidget> |
getItems(int... ids) |
java.util.List<ItemWidget> |
getItems(java.util.function.Predicate<Item> filter) |
java.util.List<ItemWidget> |
getItems(java.lang.String... names) |
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.util.function.Predicate<Item> filter) |
boolean |
interactItem(java.lang.String action,
java.lang.String... names) |
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.util.function.Predicate<Item> filter) |
boolean |
onlyContains(java.lang.String... names) |
boolean |
selectItem(int... ids) |
boolean |
selectItem(java.util.function.Predicate<Item> filter) |
boolean |
selectItem(java.lang.String... names) |
static final int SIZE
ItemWidget getItemWidget(int index)
index
- the slot indexjava.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 getItem(int... ids)
ItemWidget getItem(java.lang.String... names)
ItemWidget getItem(java.util.function.Predicate<Item> filter)
ItemWidget getItemAt(int index)
boolean isItemSelected()
int getSelectedItemId()
java.lang.String getSelectedItemName()
int getSelectedItemIndex()
ItemWidget getSelectedItem()
int getCount()
int getCount(int... ids)
int getCount(java.lang.String... names)
int getCount(boolean includeStackables, int... ids)
int getCount(boolean includeStackables, java.lang.String... names)
int getCount(boolean includeStackables)
int getCount(java.util.function.Predicate<Item> filter)
int getCount(boolean includeStackables, java.util.function.Predicate<Item> filter)
boolean isFull()
boolean isEmpty()
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 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)
boolean dropItem(int... ids)
boolean dropItem(java.lang.String... names)
boolean dropItem(java.util.function.Predicate<Item> filter)
boolean dropItem(ItemWidget item)
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 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 deselectItem()
default boolean moveItem(ItemWidget item, int slotIndex)
item
- the item to moveslotIndex
- the index of the target slotboolean moveItem(int fromIndex, int toIndex)
fromIndex
- the slot index of the item to movetoIndex
- the index of the target slot