Class Inventory
- Direct Known Subclasses:
Backpack
,Bank
,Equipment
,NullSafeInventory
A class for the manipulation of item containers.
This includes but is not limited to inventory, bank and equipment.
Please note that static lookup methods in this class are null-safe
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionInventory
(RSInventory provider, Inventory.Format format, boolean extractFromProvider, List<ComponentQuery> queries) Inventory
(RSInventory provider, Inventory.Format format, Consumer<Item> function, boolean extractFromProvider, List<ComponentQuery> queries) -
Method Summary
Modifier and TypeMethodDescriptionstatic Backpack
backpack()
Deprecated.static Bank
bank()
Deprecated.boolean
contains
(Function<ItemQuery, ItemQueryResults> function) final boolean
containsAll
(Function<ItemQuery, ItemQueryResults>... functions) static Equipment
Deprecated.void
static Inventory
get
(long key, Inventory.Format format, boolean extractFromProvider, List<ComponentQuery> queries) Deprecated.static Inventory
get
(InventoryType composite) Deprecated.static Inventory
get
(InventoryType composite, boolean extractFromProvider) Deprecated.int
int
getCount
(Function<ItemQuery, ItemQueryResults> function) int
getCount
(Function<ItemQuery, ItemQueryResults> function, boolean includeStacks) int
getItems()
getItems
(int... ids) long
getKey()
static Item
boolean
interact
(Function<ItemQuery, ItemQueryResults> function, String action) boolean
isEmpty()
boolean
isFull()
static boolean
boolean
isLoaded()
boolean
query()
static ItemQuery
queryOf
(InventoryType type) Deprecated.static ItemQuery
queryOf
(InventoryType type, boolean extractFromProvider) Deprecated.void
setExtractFromProvider
(boolean extractFromProvider) void
setQueries
(List<ComponentQuery> queries) toString()
Methods inherited from class org.rspeer.game.adapter.Adapter
getProvider, validate
-
Constructor Details
-
Inventory
public Inventory(RSInventory provider, Inventory.Format format, Consumer<Item> function, boolean extractFromProvider, List<ComponentQuery> queries) -
Inventory
public Inventory(RSInventory provider, Inventory.Format format, boolean extractFromProvider, List<ComponentQuery> queries)
-
-
Method Details
-
backpack
Deprecated. -
equipment
Deprecated. -
bank
Deprecated. -
queryOf
Deprecated. -
queryOf
Deprecated. -
get
@Deprecated public static Inventory get(long key, Inventory.Format format, boolean extractFromProvider, List<ComponentQuery> queries) Deprecated. -
get
Deprecated. -
get
Deprecated. -
isItemSelected
public static boolean isItemSelected() -
getSelectedItem
-
setQueries
-
forceDefaultProvider
public void forceDefaultProvider() -
setExtractFromProvider
public void setExtractFromProvider(boolean extractFromProvider) -
interact
-
getKey
public long getKey() -
isUnbound
public boolean isUnbound() -
getCapacity
public int getCapacity() -
getEmptySlots
public int getEmptySlots() -
getCount
-
getCount
-
contains
-
containsAll
-
isFull
public boolean isFull() -
isEmpty
public boolean isEmpty() -
isLoaded
public boolean isLoaded() -
getItems
-
getItems
-
getItems
-
getItems
-
query
-
toString
-