Interface Interactable<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getId()
      The item ID for the wrapped game entity
      java.lang.String getName()
      The game entities name.
      boolean interact​(java.lang.String action)
      Interacts with the entity using the given action verb.
      boolean isNull()
      True when the game entity is null and false otherwise.
      T raw()
      Returns the wrapped (raw) RuneLite API object for this interactable game entity.
    • Method Detail

      • interact

        boolean interact​(java.lang.String action)
        Interacts with the entity using the given action verb.
        Parameters:
        action - The menu action to trigger (e.g., "Attack", "Talk-to", "Take")
        Returns:
        true if the interaction packet was successfully queued/sent
      • raw

        T raw()
        Returns the wrapped (raw) RuneLite API object for this interactable game entity. This is useful to provide easy access to familiar and underlying RuneLite game data. For example: an EquipmentEntity will expose the RuneLite Widget object for the interactable piece of equipment.
        Returns:
        T wrapped RuneLite API object.
      • getId

        int getId()
        The item ID for the wrapped game entity
        Returns:
        int Item id
      • getName

        java.lang.String getName()
        The game entities name.
        Returns:
        The name of the game entity i.e. NPC name for NPC's, item name for ContainerItem's, and GameObject name for various game objects.
      • isNull

        boolean isNull()
        True when the game entity is null and false otherwise. This may happen when a game entity you expected to be present is no longer available i.e. The nearest Oak tree was just chopped down by another player and is now null.
        Returns:
        True when the game entity is null and false otherwise.