Class ObjectService


  • @Singleton
    public class ObjectService
    extends java.lang.Object
    Discovery and menu-first interaction for loaded scene objects.
    • Constructor Detail

      • ObjectService

        @Inject
        public ObjectService​(net.runelite.api.Client client,
                             MenuDispatcher dispatcher)
    • Method Detail

      • all

        public java.util.List<ObjectRef> all()
      • 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)
      • 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.