Search in sources :

Example 1 with GameShutDownEvent

use of cc.hyperium.event.client.GameShutDownEvent in project Hyperium by HyperiumClient.

the class Hyperium method shutdown.

/**
 * Called on {@link MixinMinecraft#shutdown(CallbackInfo)}
 */
private void shutdown() {
    // Close the Netty client
    client.close();
    // Save config
    CONFIG.save();
    // Close Discord Rich Presence
    richPresenceManager.shutdown();
    // Create the previous chat file
    createPreviousChatFile();
    // Post an event telling the client that it's shutting down
    EventBus.INSTANCE.post(new GameShutDownEvent());
    LOGGER.info("Shutting down Hyperium..");
}
Also used : GameShutDownEvent(cc.hyperium.event.client.GameShutDownEvent)

Aggregations

GameShutDownEvent (cc.hyperium.event.client.GameShutDownEvent)1