Package com.ultikits.ultitools.utils
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 TypeMethodDescriptionbooleanWhether this server can restart at all — thesettings.restart-scriptfile the server would run exists.voidSchedules the restart on the main thread, after the result frame was sent.voidSchedules the stop on the main thread, after the result frame was sent.
-
Method Details
-
restartSupported
boolean restartSupported()Whether this server can restart at all — thesettings.restart-scriptfile 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.
-