Package net.openosrs.api.service.object
Class ObjectService
- java.lang.Object
-
- net.openosrs.api.service.object.ObjectService
-
@Singleton public class ObjectService extends java.lang.ObjectDiscovery and menu-first interaction for loaded scene objects.
-
-
Constructor Summary
Constructors Constructor Description ObjectService(net.runelite.api.Client client, MenuDispatcher dispatcher)ObjectService(net.runelite.api.Client client, MenuDispatcher dispatcher, SceneTargetLifetimes lifetimes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ObjectRef>all()voidinteract(ObjectRef object, int option)Interact by one-based object option number (1..5).voidinteract(ObjectRef object, java.lang.String action)booleanisReachable(ObjectRef object)Return whether the local player can reach the object's tile or an adjacent walkable tile in the active scene.ObjectRefnearest(int id)ObjectRefnearest(java.lang.String name)ObjectRefnearest(net.runelite.api.coords.WorldPoint point)ObjectQuerysearch()booleansubmitInteract(ObjectRef object, java.lang.String action)Submission only; does not prove the server completed the action.
-
-
-
Constructor Detail
-
ObjectService
public ObjectService(net.runelite.api.Client client, MenuDispatcher dispatcher)
-
ObjectService
@Inject public ObjectService(net.runelite.api.Client client, MenuDispatcher dispatcher, SceneTargetLifetimes lifetimes)
-
-
Method Detail
-
all
public java.util.List<ObjectRef> all()
-
search
public ObjectQuery search()
-
nearest
public ObjectRef nearest(java.lang.String name)
-
nearest
public ObjectRef nearest(int id)
-
nearest
public ObjectRef nearest(net.runelite.api.coords.WorldPoint point)
-
interact
public void interact(ObjectRef object, java.lang.String action)
-
submitInteract
public boolean submitInteract(ObjectRef object, java.lang.String action)
Submission only; does not prove the server completed the action.
-
interact
public void interact(ObjectRef object, int option)
Interact by one-based object option number (1..5).
-
isReachable
public boolean isReachable(ObjectRef object)
Return whether the local player can reach the object's tile or an adjacent walkable tile in the active scene. Objects commonly mark their own tile as blocked, so adjacency is the useful interaction reachability check.
-
-