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.

@FunctionalInterface public interface ServerShutdownCallback
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
    Modifier and Type
    Field
    Description
    The event instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the server is shutting down.
  • Field Details

  • Method Details

    • onServerShutdown

      void onServerShutdown(TaleServer server)
      Called when the server is shutting down.
      Parameters:
      server - the server instance that is shutting down