public class SimpleInventory extends SimpleItemQuery<SimpleItem>
ctx
Constructor and Description |
---|
SimpleInventory(ClientContext ctx) |
Modifier and Type | Method and Description |
---|---|
boolean |
canPickupItem(SimpleGroundItem groundItem)
Will return if you have enough space to pickup a grounditem or not.
|
boolean |
dropAllExcept(java.util.function.Predicate<SimpleItem> predicate) |
boolean |
dropItem(SimpleItem item) |
boolean |
dropItems()
Will attempt to drop all items in the query
|
boolean |
dropItems(SimpleItemQuery<SimpleItem> itemQuery)
Will attempt to drop all items in the specified query
|
int |
getFreeSlots()
Will return the amount of free slots in your inventory, NOTE: This method
DOES NOT populate the query
|
boolean |
inventoryFull()
Will return {true} if your inventory is full otherwise {false}, NOTE: This
method DOES NOT populate the query
|
java.util.List<SimpleItem> |
list() |
filter, filter, filter, filterContains, filterHasAction, filterHasAction, population
contains, filter, isEmpty, iterator, next, peekNext, populate, population, reverse, shuffle, size, sort, toStream
public SimpleInventory(ClientContext ctx)
ctx
- public java.util.List<SimpleItem> list()
public boolean inventoryFull()
public int getFreeSlots()
public boolean canPickupItem(SimpleGroundItem groundItem)
groundItem
- the item to attempt to pickuppublic boolean dropItem(SimpleItem item)
public boolean dropItems()
public boolean dropItems(SimpleItemQuery<SimpleItem> itemQuery)
itemQuery
- the query of items to droppublic boolean dropAllExcept(java.util.function.Predicate<SimpleItem> predicate)