From 8a01cf42f40d0b311a74c4993f36d1aea2623e20 Mon Sep 17 00:00:00 2001 From: Gravit Date: Fri, 3 Apr 2020 19:14:38 +0700 Subject: [PATCH] [FIX] DiscordRPC fix --- .../pro/gravit/launchermodules/discordrpc/ClientModule.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DiscordRPC_lmodule/src/main/java/pro/gravit/launchermodules/discordrpc/ClientModule.java b/DiscordRPC_lmodule/src/main/java/pro/gravit/launchermodules/discordrpc/ClientModule.java index 5349cf67..c08b625a 100644 --- a/DiscordRPC_lmodule/src/main/java/pro/gravit/launchermodules/discordrpc/ClientModule.java +++ b/DiscordRPC_lmodule/src/main/java/pro/gravit/launchermodules/discordrpc/ClientModule.java @@ -1,6 +1,7 @@ package pro.gravit.launchermodules.discordrpc; import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.client.events.ClientEngineInitPhase; import pro.gravit.launcher.client.events.ClientExitPhase; import pro.gravit.launcher.client.events.ClientPreGuiPhase; import pro.gravit.launcher.client.events.client.ClientProcessBuilderParamsWrittedEvent; @@ -24,7 +25,7 @@ public ClientModule() { public void init(LauncherInitContext initContext) { registerEvent(this::clientInit, ClientProcessLaunchEvent.class); - registerEvent(this::launcherInit, ClientPreGuiPhase.class); + registerEvent(this::launcherInit, ClientEngineInitPhase.class); registerEvent(this::exitHandler, ClientExitPhase.class); registerEvent(this::exitByStartClient, ClientProcessBuilderParamsWrittedEvent.class); } @@ -53,7 +54,7 @@ private void clientInit(ClientProcessLaunchEvent phase) { }).start(); } - private void launcherInit(ClientPreGuiPhase phase) + private void launcherInit(ClientEngineInitPhase phase) { CommonHelper.newThread("Discord RPC Thread", true, () -> { try {