From d2cc31fbf52dbf72088766d04d9dd0f91378a726 Mon Sep 17 00:00:00 2001 From: acrylic-style Date: Tue, 23 Jul 2024 13:51:04 +0900 Subject: [PATCH] fix: UnsatisfiedLinkError --- .../blueberrymc/client/BlueberryClient.java | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) 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