Skip to content

Commit

Permalink
fix: UnsatisfiedLinkError
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Jul 23, 2024
1 parent 60f1477 commit d2cc31f
Showing 1 changed file with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,25 +104,27 @@ public boolean isOnGameThread() {
// <start or end>
@Override
public void updateDiscordStatus(@Nullable String details, @Nullable String state, @Nullable SimpleEntry<String, String> bigImage, @Nullable SimpleEntry<String, String> 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
Expand Down

0 comments on commit d2cc31f

Please sign in to comment.