Fixed #11361
This commit is contained in:
@@ -118,17 +118,19 @@ public class DesktopLauncher extends ClientLauncher{
|
|||||||
testMobile = Seq.with(args).contains("-testMobile");
|
testMobile = Seq.with(args).contains("-testMobile");
|
||||||
|
|
||||||
if(useDiscord){
|
if(useDiscord){
|
||||||
try{
|
Threads.daemon(() -> {
|
||||||
DiscordRPC.connect(discordID);
|
try{
|
||||||
Log.info("Initialized Discord rich presence.");
|
DiscordRPC.connect(discordID);
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread(DiscordRPC::close));
|
Log.info("Initialized Discord rich presence.");
|
||||||
}catch(NoDiscordClientException none){
|
Runtime.getRuntime().addShutdownHook(new Thread(DiscordRPC::close));
|
||||||
//don't log if no client is found
|
}catch(NoDiscordClientException none){
|
||||||
useDiscord = false;
|
//don't log if no client is found
|
||||||
}catch(Throwable t){
|
useDiscord = false;
|
||||||
useDiscord = false;
|
}catch(Throwable t){
|
||||||
Log.warn("Failed to initialize Discord RPC - you are likely using a JVM <16.");
|
useDiscord = false;
|
||||||
}
|
Log.warn("Failed to initialize Discord RPC - you are likely using a JVM <16.");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(useSteam){
|
if(useSteam){
|
||||||
|
|||||||
+1
-1
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=9b4648505a
|
archash=65d654d634
|
||||||
|
|||||||
Reference in New Issue
Block a user