Interface Interactable

All Superinterfaces:
Actionable, Clickable, Renderable
All Known Subinterfaces:
Actor, GameEntity, GroundItem, ItemWidget, NPC, Player, SceneObject, WidgetChild
All Known Implementing Classes:
Tile

public interface Interactable extends Clickable, Actionable
An entity that can be interacted with.
  • Method Details

    • interact

      default boolean interact()
      Interacts with the entity by clicking on it. Convenience method for Clickable.click().
      Returns:
      true if the interaction succeeded, false otherwise
    • interact

      default boolean interact(boolean rightClick)
      Interacts with the entity by clicking on it. Convenience method for Clickable.click(boolean).
      Parameters:
      rightClick - true to use the right mouse button to click
      Returns:
      true if the interaction succeeded, false otherwise
    • interact

      boolean interact(String action)
      Interacts with the entity.
      Parameters:
      action - the action to select
      Returns:
      true if the interaction succeeded, false otherwise
    • interact

      boolean interact(String action, String option)
      Interacts with the entity.
      Parameters:
      action - the action to select (e.g. Bank)
      option - the option to select (e.g. Bank booth)
      Returns:
      true if the interaction succeeded, false otherwise
    • interactMatch

      default boolean interactMatch(String actionRegex)
      Interacts with the entity using an action matching the given regular expression.
      Parameters:
      actionRegex - the action regex
      Returns:
      true if the interaction succeeded, false otherwise