Interface Actionable

All Known Subinterfaces:
Actor, GameEntity, GroundItem, Interactable, Item, ItemWidget, NPC, Player, SceneObject, WidgetChild, WidgetChildItem
All Known Implementing Classes:
Tile

public interface Actionable
An entity that has a known action list.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the available actions.
    boolean
    hasAction(String... actions)
    Determines if this entity has one of the given actions.
    default boolean
    hasActionMatch(String actionRegex)
    Determines if this entity has an action matching the given regular expression.
  • Method Details

    • getActions

      List<String> getActions()
      Gets the available actions.
      Returns:
      list of actions
    • hasAction

      boolean hasAction(String... actions)
      Determines if this entity has one of the given actions.
      Parameters:
      actions - one or multiple actions
      Returns:
      true if it has one of the given actions, false otherwise
    • hasActionMatch

      default boolean hasActionMatch(String actionRegex)
      Determines if this entity has an action matching the given regular expression.
      Parameters:
      actionRegex - the action regex
      Returns:
      true if a match was found, false otherwise