Class InventoryService
- java.lang.Object
-
- net.openosrs.api.service.inventory.InventoryService
-
@Singleton public class InventoryService extends java.lang.ObjectInventory reads and menu-first slot interactions.
-
-
Constructor Summary
Constructors Constructor Description InventoryService(net.runelite.api.Client client, MenuDispatcher dispatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<InventoryItem>all()intcount(int id)voiddrop(InventoryItem item)InventoryItemfirst(int id)InventoryItemfirst(java.lang.String name)voidinteract(InventoryItem item, java.lang.String action)booleanisEmpty()booleanisFull()InventoryQuerysearch()voiduse(InventoryItem item)voiduseOn(InventoryItem item, GroundItemRef groundItem)Use an inventory item on a ground item through the native menu tuple.voiduseOn(InventoryItem item, InventoryItem target)Use an inventory item on another inventory item through the native menu tuple.voiduseOn(InventoryItem item, NpcRef npc)Use an inventory item on an NPC through the native menu tuple.voiduseOn(InventoryItem item, ObjectRef object)Use an inventory item on a scene object through the native menu tuple.voiduseOn(InventoryItem item, PlayerRef player)Use an inventory item on another player through the native menu tuple.
-
-
-
Constructor Detail
-
InventoryService
@Inject public InventoryService(net.runelite.api.Client client, MenuDispatcher dispatcher)
-
-
Method Detail
-
all
public java.util.List<InventoryItem> all()
-
search
public InventoryQuery search()
-
first
public InventoryItem first(int id)
-
first
public InventoryItem first(java.lang.String name)
-
count
public int count(int id)
-
isEmpty
public boolean isEmpty()
-
isFull
public boolean isFull()
-
use
public void use(InventoryItem item)
-
useOn
public void useOn(InventoryItem item, NpcRef npc)
Use an inventory item on an NPC through the native menu tuple.
-
useOn
public void useOn(InventoryItem item, PlayerRef player)
Use an inventory item on another player through the native menu tuple.
-
useOn
public void useOn(InventoryItem item, ObjectRef object)
Use an inventory item on a scene object through the native menu tuple.
-
useOn
public void useOn(InventoryItem item, GroundItemRef groundItem)
Use an inventory item on a ground item through the native menu tuple.
-
useOn
public void useOn(InventoryItem item, InventoryItem target)
Use an inventory item on another inventory item through the native menu tuple.
-
interact
public void interact(InventoryItem item, java.lang.String action)
-
drop
public void drop(InventoryItem item)
-
-