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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.List<java.lang.String>
getActions()
Gets the available actions.boolean
hasAction(java.lang.String... actions)
Determines if this entity has one of the given actions.default boolean
hasActionMatch(java.lang.String actionRegex)
Determines if this entity has an action matching the given regular expression.
-
-
-
Method Detail
-
getActions
java.util.List<java.lang.String> getActions()
Gets the available actions.- Returns:
- list of actions
-
hasAction
boolean hasAction(java.lang.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(java.lang.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
-
-