diff options
author | syeyoung <cyong06@naver.com> | 2021-08-28 11:42:27 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-08-28 11:42:27 +0900 |
commit | b1fb471d6e8ac2619068f4aff8c8ff0a2f125d15 (patch) | |
tree | dbdd03970963cdac7690305bd8b29cd5fc1e1c87 /src/main/java/kr/syeyoung/dungeonsguide/features | |
parent | 9a1c94a32122e7ec5cad922208bc8d267b41a8b3 (diff) | |
download | Skyblock-Dungeons-Guide-b1fb471d6e8ac2619068f4aff8c8ff0a2f125d15.tar.gz Skyblock-Dungeons-Guide-b1fb471d6e8ac2619068f4aff8c8ff0a2f125d15.tar.bz2 Skyblock-Dungeons-Guide-b1fb471d6e8ac2619068f4aff8c8ff0a2f125d15.zip |
- Option to disable GameSDK
- Fix disable reparty not working
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java | 1 | ||||
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyFinder.java | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java index 55e2753b..0fac0dba 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java @@ -86,6 +86,7 @@ public class FeatureRegistry { }); public static final PartyInviteViewer DISCORD_ASKTOJOIN = register(new PartyInviteViewer()); public static final PlayingDGAlarm DISCORD_ONLINEALARM = register(new PlayingDGAlarm()); + public static final SimpleFeature DISCORD_DONOTUSE = register(new SimpleFeature("Discord", "Disable Native Library", "Disables usage of jna for discord rpc support.\nBreaks any discord related feature in the mod.\nRequires mod restart to get affected.\n\nThis feature is only for those whose minecraft crashes due to discord gamesdk crash.", "discord.rpc", false)); public static final SimpleFeature SOLVER_RIDDLE = register(new SimpleFeature("Solver.Any Floor", "Riddle", "Highlights the correct box after clicking on all 3 weirdos", "solver.riddle")); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyFinder.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyFinder.java index b73a2024..23c8e253 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyFinder.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/party/customgui/PanelPartyFinder.java @@ -25,6 +25,7 @@ import kr.syeyoung.dungeonsguide.features.impl.discord.invteTooltip.MTooltipInvi import kr.syeyoung.dungeonsguide.gui.MPanel; import kr.syeyoung.dungeonsguide.gui.elements.*; import kr.syeyoung.dungeonsguide.party.PartyManager; +import kr.syeyoung.dungeonsguide.rpc.RichPresenceManager; import kr.syeyoung.dungeonsguide.utils.RenderUtils; import lombok.Getter; import net.minecraft.client.Minecraft; @@ -40,6 +41,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.ChatComponentText; import java.awt.*; import java.util.HashMap; @@ -116,7 +118,11 @@ public class PanelPartyFinder extends MPanel { discordInvite = new MButton(); discordInvite.setText("Invite Discord Friends"); discordInvite.setOnActionPerformed(() -> { - if (PartyManager.INSTANCE.isAllowAskToJoin()) { + if (RichPresenceManager.INSTANCE.getLastSetupCode() == -9999) { + MModalMessage mTooltipInvite = new MModalMessage("Error", "Discord GameSDK has been disabled, or it failed to load", () -> {}); + mTooltipInvite.setScale( new ScaledResolution(Minecraft.getMinecraft()).getScaleFactor()); + mTooltipInvite.open(this); + } else if (PartyManager.INSTANCE.isAllowAskToJoin()) { MTooltipInvite mTooltipInvite = new MTooltipInvite(); mTooltipInvite.setScale( new ScaledResolution(Minecraft.getMinecraft()).getScaleFactor()); mTooltipInvite.open(this); |