Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit ad76e66

Browse files
committed
fix a crash
1 parent 3e1eb50 commit ad76e66

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main/java/io/github/axolotlclient/modules/rpc/DiscordRPC.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,14 @@ public void updateActivity() {
132132
}
133133

134134
public static void setWorld(String world){
135-
currentActivity.setDetails("World: "+ world);
136-
if(discordRPC.isOpen()) {
137-
discordRPC.activityManager().updateActivity(currentActivity);
135+
if(running) {
136+
if (currentActivity == null) {
137+
DiscordRPC.getInstance().updateRPC();
138+
}
139+
currentActivity.setDetails("World: " + world);
140+
if (discordRPC.isOpen()) {
141+
discordRPC.activityManager().updateActivity(currentActivity);
142+
}
138143
}
139144
}
140145

0 commit comments

Comments
 (0)