Interface MigrationProcess.Callback

Enclosing interface:
MigrationProcess

public static interface MigrationProcess.Callback
A callback gets called when the process is done. You can add your own one with MigrationProcess.addCallback(Callback). All methods are getting synchronized to Bukkit's main thread before getting called.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onFail(long duration, String errorMessage)
    Gets called when the process didn't finish due to an error or a manual cancellation
    void
    onSuccess(long duration)
    Gets called when the process went sucessfully as inititally planned.
  • Method Details

    • onSuccess

      void onSuccess(long duration)
      Gets called when the process went sucessfully as inititally planned.
      Parameters:
      duration - The time it took to execute this process in ms
    • onFail

      void onFail(long duration, String errorMessage)
      Gets called when the process didn't finish due to an error or a manual cancellation
      Parameters:
      duration - The time it took to execute this process in ms
      errorMessage - The reason it got cancelled