Package dev.polv.taleapi.event.server
Interface ServerShutdownCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Called when the server is shutting down.
This event fires when the server begins its shutdown sequence. Use this for cleanup tasks, saving data, or graceful disconnection of resources.
This event is NOT cancellable. The server will continue shutting down regardless of listener behavior.
Example Usage
ServerShutdownCallback.EVENT.register(server -> {
System.out.println("Server is shutting down...");
// Save data, close connections, cleanup resources
});
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidonServerShutdown(TaleServer server) Called when the server is shutting down.
-
Field Details
-
EVENT
The event instance. Use this to register listeners and fire the event.
-
-
Method Details
-
onServerShutdown
Called when the server is shutting down.- Parameters:
server- the server instance that is shutting down
-