Interface ActionAPI

All Known Subinterfaces:
GameAPI

public interface ActionAPI
Game action queuing and execution control.
See Also:
  • Method Details

    • queueAction

      void queueAction(GameAction action)
      Queues a single game action for execution on the next game tick.
      Parameters:
      action - the action to queue
    • queueActions

      int queueActions(List<GameAction> actions)
      Queues multiple game actions for execution.
      Parameters:
      actions - the actions to queue
      Returns:
      the number of actions successfully queued
    • getActionQueueSize

      int getActionQueueSize()
      Returns the number of actions currently pending in the queue.
      Returns:
      the queue size
    • clearActionQueue

      void clearActionQueue()
      Clears all pending actions from the queue.
    • getActionHistory

      List<ActionEntry> getActionHistory(int maxResults, int actionIdFilter)
      Returns a history of recently executed actions.
      Parameters:
      maxResults - maximum number of entries to return
      actionIdFilter - filter by action ID, or -1 for all
      Returns:
      a list of historical action entries
    • getLastActionTime

      long getLastActionTime()
      Returns the game-cycle timestamp of the last executed action.
      Returns:
      the timestamp in milliseconds
    • areActionsBlocked

      boolean areActionsBlocked()
      Checks whether action queuing is currently blocked.
      Returns:
      true if actions are blocked
    • setActionsBlocked

      void setActionsBlocked(boolean blocked)
      Enables or disables action blocking.
      Parameters:
      blocked - true to block actions, false to unblock