Interface IUndoableAction

All Superinterfaces:
IAction, IRuntimeAction
All Known Implementing Classes:
ActionAddDataReceiver, ActionAddShiftedTooltip, ActionAddTooltip, ActionAddTrade, ActionAddWanderingTrade, ActionClearTooltip, ActionModifyAttribute, ActionModifyShiftedTooltip, ActionModifyTooltip, ActionRegisterEvent, ActionRemoveRegexTooltip, ActionRemoveTrade, ActionRemoveWanderingTrade, ActionSetBlockProperty, ActionSetBurnTime, ActionSetCauldronInteraction, ActionSetCompostable, ActionSetItemProperty, ActionTooltipBase, ActionTradeBase

public interface IUndoableAction extends IRuntimeAction
Represents an action that should be run on every game reload and that requires additional cleanup code.

Refer to IRuntimeAction and IAction for more information.

Since:
9.1.0
  • Method Details

    • undo

      void undo()
      Undoes all changes carried out by the action.
      Since:
      9.1.0
    • describeUndo

      String describeUndo()
      Gets a human-readable description of the action rollback.

      This message is used for logging and to surface information to the user when something goes wrong. It is thus customary to describe the rollback as accurately as possible without being too verbose.

      It is not allowed to return a null or otherwise empty description for the rollback: doing so will raise an error at runtime.

      Returns:
      A description of the current action rollback.
      Since:
      9.1.0