Interface PowerActionHandler.PowerExecutor

All Known Implementing Classes:
BukkitPowerExecutor
Enclosing class:
PowerActionHandler

static interface PowerActionHandler.PowerExecutor
The two calls BukkitPowerExecutor turns into a main-thread stop or restart, kept behind an interface so the handler stays unit-testable without a live server.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether this server can restart at all — the settings.restart-script file the server would run exists.
    void
    Schedules the restart on the main thread, after the result frame was sent.
    void
    Schedules the stop on the main thread, after the result frame was sent.
  • Method Details

    • restartSupported

      boolean restartSupported()
      Whether this server can restart at all — the settings.restart-script file the server would run exists.
      Returns:
      true when a restart would actually restart rather than stop
    • scheduleStop

      void scheduleStop()
      Schedules the stop on the main thread, after the result frame was sent.
    • scheduleRestart

      void scheduleRestart()
      Schedules the restart on the main thread, after the result frame was sent.