Package dev.polv.taleapi.event.server
Interface ServerStartingCallback
- 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 starting up.
This event fires early in the server startup process, before the server is fully initialized and ready to accept connections. Use this for initialization tasks that need to happen during startup.
This event is NOT cancellable. The server will continue starting regardless of listener behavior.
Example Usage
ServerStartingCallback.EVENT.register(server -> {
System.out.println("Server is starting up...");
// Initialize your plugin resources here
});
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidonServerStarting(TaleServer server) Called when the server is starting up.
-
Field Details
-
EVENT
The event instance. Use this to register listeners and fire the event.
-
-
Method Details
-
onServerStarting
Called when the server is starting up.- Parameters:
server- the server instance that is starting
-