diff --git a/Blueberry-API/src/main/java/net/blueberrymc/client/BlueberryClient.java b/Blueberry-API/src/main/java/net/blueberrymc/client/BlueberryClient.java index 951a861..d33e14e 100644 --- a/Blueberry-API/src/main/java/net/blueberrymc/client/BlueberryClient.java +++ b/Blueberry-API/src/main/java/net/blueberrymc/client/BlueberryClient.java @@ -104,25 +104,27 @@ public boolean isOnGameThread() { // @Override public void updateDiscordStatus(@Nullable String details, @Nullable String state, @Nullable SimpleEntry bigImage, @Nullable SimpleEntry smallImage, long start) { - Activity activity = new Activity(); - if (details != null) { - activity.setDetails(details); - } - if (state != null) { - activity.setState(state); - } - if (bigImage != null) { - activity.assets().setLargeImage(bigImage.getKey()); - activity.assets().setLargeText(bigImage.getValue()); - } - if (smallImage != null) { - activity.assets().setSmallImage(smallImage.getKey()); - activity.assets().setSmallText(smallImage.getValue()); - } - if (start > 0) { - activity.timestamps().setStart(Instant.ofEpochMilli(start)); + if (DiscordRPCTaskExecutor.discordRpcEnabled) { + Activity activity = new Activity(); + if (details != null) { + activity.setDetails(details); + } + if (state != null) { + activity.setState(state); + } + if (bigImage != null) { + activity.assets().setLargeImage(bigImage.getKey()); + activity.assets().setLargeText(bigImage.getValue()); + } + if (smallImage != null) { + activity.assets().setSmallImage(smallImage.getKey()); + activity.assets().setSmallText(smallImage.getValue()); + } + if (start > 0) { + activity.timestamps().setStart(Instant.ofEpochMilli(start)); + } + setDiscordRichPresenceQueue(activity); } - setDiscordRichPresenceQueue(activity); } @Nullable