aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main
diff options
context:
space:
mode:
authorsyeyoung <42869671+cyoung06@users.noreply.github.com>2023-01-15 22:22:47 +0900
committerGitHub <noreply@github.com>2023-01-15 22:22:47 +0900
commit60c4875a0ebcda90a93aa22aedaaafec258fdfee (patch)
tree3f05d5e408d0891a9ff34fd0a396bf6a4f0960dc /mod/src/main
parent587d1cc9c851bde1b3e3ddc1ca80aac128d35890 (diff)
downloadSkyblock-Dungeons-Guide-60c4875a0ebcda90a93aa22aedaaafec258fdfee.tar.gz
Skyblock-Dungeons-Guide-60c4875a0ebcda90a93aa22aedaaafec258fdfee.tar.bz2
Skyblock-Dungeons-Guide-60c4875a0ebcda90a93aa22aedaaafec258fdfee.zip
Skyblock dungeons guide 234 (#271)
* Skyblock-Dungeons-Guide-234 M1 Compatibility - fix cursors #234 Signed-off-by: syeyoung <cyoung06@naver.com> * - Latest gamesdk (which apparently has issues) https://discord.pyrrha.dev/#/versions v3.2.1 Signed-off-by: syeyoung <cyoung06@naver.com> * - rename libraries Signed-off-by: syeyoung <cyoung06@naver.com> * - update gamesdk ** Interfaces are not updated ** I only updated Signed-off-by: syeyoung <cyoung06@naver.com> * - get rid of gamesdk because it's pain to work with Signed-off-by: syeyoung <cyoung06@naver.com> * - implement ask to join and stuff Signed-off-by: syeyoung <cyoung06@naver.com> * - update library and stuff Signed-off-by: syeyoung <cyoung06@naver.com> * - - better logging Signed-off-by: syeyoung <cyoung06@naver.com> Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod/src/main')
-rwxr-xr-xmod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java14
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java8
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/DiscordIntegrationManager.java280
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/InviteHandle.java (renamed from mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkPeerId.java)21
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/JDiscordRelation.java79
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/RichPresence.java336
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/User.java207
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java109
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/GameSDKTypeMapper.java47
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/NativeGameSDK.java50
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivity.java50
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityAssets.java42
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityParty.java40
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivitySecrets.java41
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityTimestamps.java40
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordCreateParams.java72
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordEntitlement.java42
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordFileStat.java41
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageDimensions.java40
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageHandle.java43
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordInputMode.java41
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordLobby.java46
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordOAuth2Token.java42
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPartySize.java40
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPresence.java40
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordRelationship.java41
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSku.java44
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSkuPrice.java40
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordStruct.java35
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUser.java43
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUserAchievement.java43
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityActionType.java67
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java68
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityType.java69
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordCreateFlags.java67
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordEntitlementType.java72
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordImageType.java66
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordInputModeType.java67
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java67
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java71
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java69
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbyType.java67
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLogLevel.java69
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordPremiumType.java68
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordRelationshipType.java71
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordResult.java109
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordSkuType.java69
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordStatus.java69
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordUserFlag.java70
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/GameSDKCallback.java30
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java39
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java57
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java50
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityManager.java63
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java60
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordCore.java91
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordImageManager.java52
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java64
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java148
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java42
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java52
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java57
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java45
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java65
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java38
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java56
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java42
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java53
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStorageManager.java81
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java43
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreManager.java73
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserEvents.java38
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserManager.java53
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java39
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java72
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordClientID.java30
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordSnowflake.java30
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordTimestamp.java30
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordVersion.java30
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int32.java31
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int64.java31
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt32.java31
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt64.java31
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt8.java31
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordActivity.java72
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordRelation.java42
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordUser.java40
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/RichPresenceManager.java250
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserInvitedEvent.java (renamed from mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkChannelId.java)22
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserJoinRequestEvent.java5
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserUpdateEvent.java2
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/FeatureRegistry.java2
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyInviteViewer.java25
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyJoinRequest.java15
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInvite.java22
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInviteElement.java10
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/onlinealarm/PlayingDGAlarm.java26
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/PanelPartyFinder.java4
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/GLCursors.java7
-rw-r--r--mod/src/main/resources/gamesdk/aarch64/libdiscord_game_sdk.dylibbin0 -> 3818808 bytes
-rw-r--r--mod/src/main/resources/gamesdk/darwin/libdiscord_game_sdk.dylibbin4130000 -> 0 bytes
-rw-r--r--mod/src/main/resources/gamesdk/linux/libdiscord_game_sdk.sobin7122200 -> 0 bytes
-rw-r--r--mod/src/main/resources/gamesdk/win-x64/discord_game_sdk.dllbin3891512 -> 0 bytes
-rw-r--r--mod/src/main/resources/gamesdk/win-x86/discord_game_sdk.dllbin3154744 -> 0 bytes
-rw-r--r--mod/src/main/resources/gamesdk/x86/discord_game_sdk.dllbin0 -> 2937856 bytes
-rw-r--r--mod/src/main/resources/gamesdk/x86_64/discord_game_sdk.dllbin0 -> 3488768 bytes
-rw-r--r--mod/src/main/resources/gamesdk/x86_64/libdiscord_game_sdk.dylibbin0 -> 4251528 bytes
-rw-r--r--mod/src/main/resources/gamesdk/x86_64/libdiscord_game_sdk.sobin0 -> 8469240 bytes
108 files changed, 988 insertions, 4666 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
index d54613b8..cfb85aa9 100755
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
@@ -29,8 +29,7 @@ import kr.syeyoung.dungeonsguide.mod.commands.CommandReparty;
import kr.syeyoung.dungeonsguide.mod.config.Config;
import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
import kr.syeyoung.dungeonsguide.mod.cosmetics.CustomNetworkPlayerInfo;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.GameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.RichPresenceManager;
+import kr.syeyoung.dungeonsguide.mod.discord.DiscordIntegrationManager;
import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonFacade;
import kr.syeyoung.dungeonsguide.mod.events.annotations.EventHandlerRegistry;
import kr.syeyoung.dungeonsguide.mod.events.listener.DungeonListener;
@@ -250,12 +249,9 @@ public class DungeonsGuide implements DGInterface {
if (FeatureRegistry.ETC_REPARTY.isEnabled()) {
registerCommands(commandReparty);
}
+ DiscordIntegrationManager.INSTANCE.isLoaded();
- if (FeatureRegistry.DISCORD_DONOTUSE.isEnabled()) {
- System.setProperty("dg.safe", "true");
- }
- registerEventsForge(RichPresenceManager.INSTANCE);
TimeScoreUtil.init();
ProgressManager.pop(progressbar);
@@ -396,6 +392,7 @@ public class DungeonsGuide implements DGInterface {
e.printStackTrace();
}
+ DiscordIntegrationManager.INSTANCE.cleanup();
THREAD_GROUP.interrupt();
THREAD_GROUP.stop();
@@ -404,11 +401,6 @@ public class DungeonsGuide implements DGInterface {
} catch (InterruptedException e) {
}
THREAD_GROUP.destroy();
- try {
- GameSDK.cleanup();
- } catch (Exception e) {
- e.printStackTrace();
- }
}
@Override
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java
index c414e75a..36a0e955 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java
@@ -23,7 +23,7 @@ import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
import kr.syeyoung.dungeonsguide.mod.config.guiconfig.GuiConfigV2;
import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.RichPresenceManager;
+import kr.syeyoung.dungeonsguide.mod.discord.DiscordIntegrationManager;
import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
import kr.syeyoung.dungeonsguide.mod.features.impl.party.playerpreview.FeatureViewPlayerStatsOnJoin;
import kr.syeyoung.dungeonsguide.mod.features.impl.party.playerpreview.api.ApiFetcher;
@@ -32,12 +32,8 @@ import kr.syeyoung.dungeonsguide.mod.stomp.StompManager;
import kr.syeyoung.dungeonsguide.mod.stomp.StompPayload;
import kr.syeyoung.dungeonsguide.mod.wsresource.StaticResourceCache;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiMainMenu;
-import net.minecraft.client.gui.GuiMultiplayer;
-import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
-import net.minecraft.realms.RealmsBridge;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@@ -76,7 +72,7 @@ public class CommandDungeonsGuide extends CommandBase {
FeatureViewPlayerStatsOnJoin.processPartyMembers(context);
});
} else if (args[0].equalsIgnoreCase("asktojoin") || args[0].equalsIgnoreCase("atj")) {
- if (RichPresenceManager.INSTANCE.getLastSetupCode() == -9999) {
+ if (!DiscordIntegrationManager.INSTANCE.isLoaded()) {
sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cDiscord GameSDK has been disabled, or it failed to load!"));
return;
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/DiscordIntegrationManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/DiscordIntegrationManager.java
new file mode 100644
index 00000000..196bdbd9
--- /dev/null
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/DiscordIntegrationManager.java
@@ -0,0 +1,280 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2023 cyoung06 (syeyoung)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord;
+
+import com.jagrosh.discordipc.IPCClient;
+import com.jagrosh.discordipc.IPCListener;
+import com.jagrosh.discordipc.entities.Callback;
+import com.jagrosh.discordipc.entities.Packet;
+import com.jagrosh.discordipc.entities.RichPresence;
+import com.jagrosh.discordipc.entities.User;
+import com.jagrosh.discordipc.entities.pipe.PipeStatus;
+import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
+import kr.syeyoung.dungeonsguide.mod.SkyblockStatus;
+import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonContext;
+import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserInvitedEvent;
+import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserJoinRequestEvent;
+import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserUpdateEvent;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.features.impl.discord.inviteViewer.PartyJoinRequest;
+import kr.syeyoung.dungeonsguide.mod.party.PartyContext;
+import kr.syeyoung.dungeonsguide.mod.party.PartyManager;
+import lombok.Getter;
+import net.minecraftforge.common.MinecraftForge;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import java.lang.management.ManagementFactory;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+public class DiscordIntegrationManager implements IPCListener {
+ public static DiscordIntegrationManager INSTANCE = new DiscordIntegrationManager();
+ private IPCClient ipcClient;
+ private final Thread t = new Thread(DungeonsGuide.THREAD_GROUP, this::run);
+ private Logger logger = LogManager.getLogger("DG-DiscordIntegrationManager");
+
+ private DiscordIntegrationManager(){
+ ipcClient = new IPCClient(816298079732498473L, DungeonsGuide.THREAD_FACTORY);
+ t.start();
+ }
+
+ @Getter
+ private final Map<Long, JDiscordRelation> relationMap = new HashMap<>();
+
+ public boolean isLoaded() {
+ return ipcClient.getStatus() == PipeStatus.CONNECTED;
+ }
+
+ public void sendInvite(String id, String content) {
+ JSONObject payload = new JSONObject()
+ .put("cmd", "ACTIVITY_INVITE_USER")
+ .put("args", new JSONObject()
+ .put("type", 1)
+ .put("user_id", id)
+ .put("content", content)
+ .put("pid",getPID()));
+ ipcClient.send(payload, new Callback(success ->{}, fail -> {
+ logger.log(Level.WARN, "Discord failed send Invite for "+fail+"\n Sent payload: "+payload);
+ }));
+ }
+
+
+ public void respondToJoinRequest(String userId, PartyJoinRequest.Reply accept) {
+ JSONObject payload = null;
+ if (accept == PartyJoinRequest.Reply.ACCEPT) {
+ payload = new JSONObject()
+ .put("cmd", "SEND_ACTIVITY_JOIN_INVITE")
+ .put("args", new JSONObject().put("user_id", userId));
+ } else {
+ payload = new JSONObject()
+ .put("cmd", "CLOSE_ACTIVITY_JOIN_REQUEST")
+ .put("args", new JSONObject().put("user_id", userId));
+ }
+ JSONObject finalPayload = payload;
+ ipcClient.send(payload, new Callback(success ->{}, fail -> {
+ logger.log(Level.WARN, "Discord failed respond to join request for "+fail+"\n Sent payload: "+ finalPayload);
+ }));
+ }
+
+ public void acceptInvite(InviteHandle handle) {
+ JSONObject payload = new JSONObject()
+ .put("cmd", "ACCEPT_ACTIVITY_INVITE")
+ .put("args", new JSONObject()
+ .put("type", 1)
+ .put("user_id", handle.getUserId())
+ .put("session_id", handle.getSessionId())
+ .put("channel_id", handle.getChannelId())
+ .put("message_id", handle.getMessageId()));
+ ipcClient.send(payload, new Callback(success ->{}, fail -> {
+ logger.log(Level.WARN, "Discord failed accept invite for "+fail+"\n Sent payload: "+ payload);
+ }));
+ }
+
+
+
+ private void setup() {
+ try {
+ ipcClient.connect();
+ ipcClient.subscribe("ACTIVITY_JOIN", this::onActivityJoin);
+ ipcClient.subscribe("ACTIVITY_JOIN_REQUEST", this::onActivityJoinRequest);
+ ipcClient.subscribe("ACTIVITY_INVITE", this::onActivityInvite);
+ ipcClient.subscribe("RELATIONSHIP_UPDATE", this::onRelationshipUpdate);
+ ipcClient.send(new JSONObject().put("cmd", "GET_RELATIONSHIPS"), new Callback(this::onRelationshipLoad));
+ ipcClient.setListener(this);
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+
+ private void onRelationshipUpdate(Packet packet){
+ JSONObject data = packet.getJson().getJSONObject("data");
+ JDiscordRelation relation = JDiscordRelation.parse(data);
+ JDiscordRelation old = relationMap.put(relation.getDiscordUser().getIdLong(), relation);
+ MinecraftForge.EVENT_BUS.post(new DiscordUserUpdateEvent(old, relation));
+ }
+ private void onActivityJoinRequest(Packet packet) {
+ JSONObject data = packet.getJson().getJSONObject("data");
+ User user = new User(data.getJSONObject("user")
+ .getString("username"),
+ data.getJSONObject("user")
+ .getString("discriminator"),
+ Long.parseUnsignedLong(data.getJSONObject("user")
+ .getString("id")),
+ data.getJSONObject("user")
+ .getString("avatar"));
+ MinecraftForge.EVENT_BUS.post(new DiscordUserJoinRequestEvent(user));
+ }
+ private void onActivityInvite(Packet packet) {
+ JSONObject data = packet.getJson().getJSONObject("data");
+ if (!data.getJSONObject("activity").getString("application_id").equals("816298079732498473"))
+ return;
+ MinecraftForge.EVENT_BUS.post(new DiscordUserInvitedEvent(
+ new User(data.getJSONObject("user")
+ .getString("username"),
+ data.getJSONObject("user")
+ .getString("discriminator"),
+ Long.parseUnsignedLong(data.getJSONObject("user")
+ .getString("id")),
+ data.getJSONObject("user")
+ .getString("avatar")),
+ new InviteHandle(
+ data.getJSONObject("user").getString("id"),
+ data.getJSONObject("activity").getString("session_id"),
+ data.getString("channel_id"),
+ data.getString("message_id")
+ )));
+ }
+
+ private void onRelationshipLoad(Packet object) {
+ try {
+ JSONArray relationship = object.getJson().getJSONObject("data").getJSONArray("relationships");
+ for (Object o : relationship) {
+ JSONObject obj = (JSONObject) o;
+ JDiscordRelation relation = JDiscordRelation.parse(obj);
+ relationMap.put(relation.getDiscordUser().getIdLong(), relation);
+ }
+ } catch (Throwable e) {e.printStackTrace();}
+ }
+
+ private final SkyblockStatus skyblockStatus = DungeonsGuide.getDungeonsGuide().getSkyblockStatus();
+
+ private void sendRichPresence(RichPresence presence) {
+ ipcClient.send(new JSONObject()
+ .put("cmd","SET_ACTIVITY")
+ .put("args", new JSONObject()
+ .put("pid",getPID())
+ .put("activity",presence == null ? null : presence.toJson())), new Callback(success ->{}, fail -> {System.out.println(fail);}));
+ }
+ private void updatePresence() {
+ if (!skyblockStatus.isOnHypixel() || !FeatureRegistry.DISCORD_RICHPRESENCE.isEnabled() || (!skyblockStatus.isOnSkyblock() && FeatureRegistry.DISCORD_RICHPRESENCE.<Boolean>getParameter("disablenotskyblock").getValue())) {
+ sendRichPresence(null);
+ } else {
+ String name = DungeonContext.getDungeonName() == null ? "" : DungeonContext.getDungeonName();
+ if (!skyblockStatus.isOnSkyblock()) name ="Somewhere on Hypixel";
+ if (name.trim().equals("Your Island")) name = "Private Island";
+
+ RichPresence.Builder presence = new RichPresence.Builder();
+
+ presence.setLargeImage("mort", "mort");
+ presence.setState(name);
+ presence.setParty(
+ Optional.ofNullable( PartyManager.INSTANCE.getPartyContext()).map(PartyContext::getPartyID).orElse(null),
+ Optional.ofNullable(PartyManager.INSTANCE.getPartyContext()).map(PartyContext::getPartyRawMembers).map(Set::size).orElse(1),
+ PartyManager.INSTANCE.getMaxParty()
+ );
+
+ DungeonContext context = DungeonsGuide.getDungeonsGuide().getDungeonFacade().getContext();
+ if (context != null) {
+ long init = context.getInit();
+ presence.setStartTimestamp(Instant.ofEpochMilli(init).atZone(ZoneId.systemDefault()).toOffsetDateTime());
+
+ if (context.getBossfightProcessor() != null) {
+ presence.setDetails("Fighting "+context.getBossfightProcessor().getBossName()+": "+context.getBossfightProcessor().getCurrentPhase());
+ } else {
+ presence.setDetails("Clearing Rooms");
+ }
+ } else {
+ presence.setStartTimestamp(null);
+ presence.setDetails("Dungeons Guide");
+ }
+ if (PartyManager.INSTANCE.getAskToJoinSecret() != null) {
+ presence.setJoinSecret(PartyManager.INSTANCE.getAskToJoinSecret());
+ }
+ presence.setInstance(false);
+ sendRichPresence(presence.build());
+ }
+ }
+ private void run() {
+ while(!t.isInterrupted()) {
+ try{
+ if (!isLoaded()) setup();
+ else {
+ updatePresence();
+ }
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ try {
+ Thread.sleep(32);
+ } catch (InterruptedException e) {
+ break;
+ }
+ }
+ }
+
+
+
+ public void onActivityJoin(Packet packet) {
+ String secret = packet.getJson().getJSONObject("data").getString("secret");
+ PartyManager.INSTANCE.joinWithToken(secret);
+ logger.log(Level.DEBUG, "Trying to join with token: "+secret);
+ }
+
+ @Override
+ public void onClose(IPCClient client, JSONObject json) {
+ logger.log(Level.DEBUG, "IPC Client closed with: "+json);
+ }
+
+ @Override
+ public void onDisconnect(IPCClient client, Throwable t) {
+ logger.log(Level.DEBUG, "IPC Client disconnected for: ", t);
+ }
+
+
+
+ public void cleanup() {
+ ipcClient.close();
+ this.t.interrupt();
+ ipcClient = null;
+ }
+
+ private static int getPID()
+ {
+ String pr = ManagementFactory.getRuntimeMXBean().getName();
+ return Integer.parseInt(pr.substring(0,pr.indexOf('@')));
+ }
+}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkPeerId.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/InviteHandle.java
index 810d81ac..fce3ab89 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkPeerId.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/InviteHandle.java
@@ -1,6 +1,6 @@
/*
* Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
+ * Copyright (C) 2023 cyoung06 (syeyoung)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
@@ -16,15 +16,16 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+package kr.syeyoung.dungeonsguide.mod.discord;
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+import lombok.AllArgsConstructor;
+import lombok.Data;
-
-public class DiscordNetworkPeerId extends UInt64 {
- public DiscordNetworkPeerId() {
- this(0);
- }
- public DiscordNetworkPeerId(long value) {
- super(value);
- }
+@Data
+@AllArgsConstructor
+public class InviteHandle {
+ private String userId;
+ private String sessionId;
+ private String channelId;
+ private String messageId;
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/JDiscordRelation.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/JDiscordRelation.java
new file mode 100644
index 00000000..154ca597
--- /dev/null
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/JDiscordRelation.java
@@ -0,0 +1,79 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2023 cyoung06 (syeyoung)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord;
+
+import com.jagrosh.discordipc.entities.User;
+import lombok.Data;
+import org.json.JSONObject;
+
+@Data
+public class JDiscordRelation {
+// private EDiscordRelationshipType discordRelationshipType;
+// private EDiscordStatus status;
+// private JDiscordActivity discordActivity;
+ private Status status;
+ private String applicationId;
+ private DiscordRelationType relationType;
+ private User discordUser;
+
+ public enum Status {
+ OFFLINE, ONLINE, DO_NOT_DISTURB, IDLE, UNKNOWN;
+
+ public static Status fromString(String str) {
+ switch(str) {
+ case "offline": return OFFLINE;
+ case "online": return ONLINE;
+ case "idle": return IDLE;
+ case "dnd": return DO_NOT_DISTURB;
+ }
+ return UNKNOWN;
+ }
+ }
+ public enum DiscordRelationType {
+
+ None,
+ Friend,
+ Blocked,
+ PendingIncoming,
+ PendingOutgoing,
+ Implicit;
+ }
+
+
+ public static JDiscordRelation parse(JSONObject data) {
+ JDiscordRelation relation = new JDiscordRelation();
+ JDiscordRelation.DiscordRelationType relationType = JDiscordRelation.DiscordRelationType.values()[data.getInt("type")];
+ JSONObject userJson = data.getJSONObject("user");
+ User user = new User(userJson.getString("username"), userJson.getString("discriminator"),
+ Long.parseUnsignedLong(userJson.getString("id")),
+ userJson.isNull("avatar") ? null : userJson.getString("avatar"));
+ JDiscordRelation.Status status = JDiscordRelation.Status.fromString(data.getJSONObject("presence").getString("status"));
+
+ relation.setRelationType(relationType);
+ relation.setDiscordUser(user);
+ relation.setStatus(status);
+
+ if (data.has("activity") && !data.isNull("activity")) {
+ JSONObject activity = data.getJSONObject("activity");
+ String appId = activity.getString("application_id");
+ relation.setApplicationId(appId);
+ }
+ return relation;
+ }
+}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/RichPresence.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/RichPresence.java
new file mode 100644
index 00000000..6d104b8f
--- /dev/null
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/RichPresence.java
@@ -0,0 +1,336 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2023 cyoung06 (syeyoung)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+package kr.syeyoung.dungeonsguide.mod.discord;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import java.time.OffsetDateTime;
+
+/**
+ * An encapsulation of all data needed to properly construct a JSON RichPresence payload.
+ *
+ * <p>These can be built using {@link Builder}.
+ *
+ * @author John Grosh (john.a.grosh@gmail.com)
+ */
+public class RichPresence
+{
+ private final String state;
+ private final String details;
+ private final OffsetDateTime startTimestamp;
+ private final OffsetDateTime endTimestamp;
+ private final String largeImageKey;
+ private final String largeImageText;
+ private final String smallImageKey;
+ private final String smallImageText;
+ private final String partyId;
+ private final int partySize;
+ private final int partyMax;
+ private final String matchSecret;
+ private final String joinSecret;
+ private final String spectateSecret;
+ private final boolean instance;
+
+ public RichPresence(String state, String details, OffsetDateTime startTimestamp, OffsetDateTime endTimestamp,
+ String largeImageKey, String largeImageText, String smallImageKey, String smallImageText,
+ String partyId, int partySize, int partyMax, String matchSecret, String joinSecret,
+ String spectateSecret, boolean instance)
+ {
+ this.state = state;
+ this.details = details;
+ this.startTimestamp = startTimestamp;
+ this.endTimestamp = endTimestamp;
+ this.largeImageKey = largeImageKey;
+ this.largeImageText = largeImageText;
+ this.smallImageKey = smallImageKey;
+ this.smallImageText = smallImageText;
+ this.partyId = partyId;
+ this.partySize = partySize;
+ this.partyMax = partyMax;
+ this.matchSecret = matchSecret;
+ this.joinSecret = joinSecret;
+ this.spectateSecret = spectateSecret;
+ this.instance = instance;
+ }
+
+ /**
+ * Constructs a {@link JSONObject} representing a payload to send to discord
+ * to update a user's Rich Presence.
+ *
+ * <p>This is purely internal, and should not ever need to be called outside of
+ * the library.
+ *
+ * @return A JSONObject payload for updating a user's Rich Presence.
+ */
+ public JSONObject toJson()
+ {
+ return new JSONObject()
+ .put("state", state)
+ .put("details", details)
+ .put("timestamps", new JSONObject()
+ .put("start", startTimestamp==null ? null : startTimestamp.toEpochSecond())
+ .put("end", endTimestamp==null ? null : endTimestamp.toEpochSecond()))
+ .put("assets", new JSONObject()
+ .put("large_image", largeImageKey)
+ .put("large_text", largeImageText)
+ .put("small_image", smallImageKey)
+ .put("small_text", smallImageText))
+ .put("party", partyId==null ? null : new JSONObject()
+ .put("id", partyId)
+ .put("size", new JSONArray().put(partySize).put(partyMax)))
+ .put("secrets", new JSONObject()
+ .put("join", joinSecret)
+ .put("spectate", spectateSecret)
+ .put("match", matchSecret))
+ .put("instance", instance);
+ }
+
+ /**
+ * A chain builder for a {@link RichPresence} object.
+ *
+ * <p>An accurate description of each field and it's functions can be found
+ * <a href="https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields">here</a>
+ */
+ public static class Builder
+ {
+ private String state;
+ private String details;
+ private OffsetDateTime startTimestamp;
+ private OffsetDateTime endTimestamp;
+ private String largeImageKey;
+ private String largeImageText;
+ private String smallImageKey;
+ private String smallImageText;
+ private String partyId;
+ private int partySize;
+ private int partyMax;
+ private String matchSecret;
+ private String joinSecret;
+ private String spectateSecret;
+ private boolean instance;
+
+ /**
+ * Builds the {@link RichPresence} from the current state of this builder.
+ *
+ * @return The RichPresence built.
+ */
+ public RichPresence build()
+ {
+ return new RichPresence(state, details, startTimestamp, endTimestamp,
+ largeImageKey, largeImageText, smallImageKey, smallImageText,
+ partyId, partySize, partyMax, matchSecret, joinSecret,
+ spectateSecret, instance);
+ }
+
+ /**
+ * Sets the state of the user's current party.
+ *
+ * @param state The state of the user's current party.
+ *
+ * @return This Builder.
+ */
+ public Builder setState(String state)
+ {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Sets details of what the player is currently doing.
+ *
+ * @param details The details of what the player is currently doing.
+ *
+ * @return This Builder.
+ */
+ public Builder setDetails(String details)
+ {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Sets the time that the player started a match or activity.
+ *
+ * @param startTimestamp The time the player started a match or activity.
+ *
+ * @return This Builder.
+ */
+ public Builder setStartTimestamp(OffsetDateTime startTimestamp)
+ {
+ this.startTimestamp = startTimestamp;
+ return this;
+ }
+
+ /**
+ * Sets the time that the player's current activity will end.
+ *
+ * @param endTimestamp The time the player's activity will end.
+ *
+ * @return This Builder.
+ */
+ public Builder setEndTimestamp(OffsetDateTime endTimestamp)
+ {
+ this.endTimestamp = endTimestamp;
+ return this;
+ }
+
+ /**
+ * Sets the key of the uploaded image for the large profile artwork, as well as
+ * the text tooltip shown when a cursor hovers over it.
+ *
+ * <p>These can be configured in the <a href="https://discordapp.com/developers/applications/me">applications</a>
+ * page on the discord website.
+ *
+ * @param largeImageKey A key to an image to display.
+ * @param largeImageText Text displayed when a cursor hovers over the large image.
+ *
+ * @return This Builder.
+ */
+ public Builder setLargeImage(String largeImageKey, String largeImageText)
+ {
+ this.largeImageKey = largeImageKey;
+ this.largeImageText = largeImageText;
+ return this;
+ }
+
+ /**
+ * Sets the key of the uploaded image for the large profile artwork.
+ *
+ * <p>These can be configured in the <a href="https://discordapp.com/developers/applications/me">applications</a>
+ * page on the discord website.
+ *
+ * @param largeImageKey A key to an image to display.
+ *
+ * @return This Builder.
+ */
+ public Builder setLargeImage(String largeImageKey)
+ {
+ return setLargeImage(largeImageKey, null);
+ }
+
+ /**
+ * Sets the key of the uploaded image for the small profile artwork, as well as
+ * the text tooltip shown when a cursor hovers over it.
+ *
+ * <p>These can be configured in the <a href="https://discordapp.com/developers/applications/me">applications</a>
+ * page on the discord website.
+ *
+ * @param smallImageKey A key to an image to display.
+ * @param smallImageText Text displayed when a cursor hovers over the small image.
+ *
+ * @return This Builder.
+ */
+ public Builder setSmallImage(String smallImageKey, String smallImageText)
+ {
+ this.smallImageKey = smallImageKey;
+ this.smallImageText = smallImageText;
+ return this;
+ }
+
+ /**
+ * Sets the key of the uploaded image for the small profile artwork.
+ *
+ * <p>These can be configured in the <a href="https://discordapp.com/developers/applications/me">applications</a>
+ * page on the discord website.
+ *
+ * @param smallImageKey A key to an image to display.
+ *
+ * @return This Builder.
+ */
+ public Builder setSmallImage(String smallImageKey)
+ {
+ return setSmallImage(smallImageKey, null);
+ }
+
+ /**
+ * Sets party configurations for a team, lobby, or other form of group.
+ *
+ * <p>The {@code partyId} is ID of the player's party.
+ * <br>The {@code partySize} is the current size of the player's party.
+ * <br>The {@code partyMax} is the maximum number of player's allowed in the party.
+ *
+ * @param partyId The ID of the player's party.
+ * @param partySize The current size of the player's party.
+ * @param partyMax The maximum number of player's allowed in the party.
+ *
+ * @return This Builder.
+ */
+ public Builder setParty(String partyId, int partySize, int partyMax)
+ {
+ this.partyId = partyId;
+ this.partySize = partySize;
+ this.partyMax = partyMax;
+ return this;
+ }
+
+ /**
+ * Sets the unique hashed string for Spectate and Join.
+ *
+ * @param matchSecret The unique hashed string for Spectate and Join.
+ *
+ * @return This Builder.
+ */
+ public Builder setMatchSecret(String matchSecret)
+ {
+ this.matchSecret = matchSecret;
+ return this;
+ }
+
+ /**
+ * Sets the unique hashed string for chat invitations and Ask to Join.
+ *
+ * @param joinSecret The unique hashed string for chat invitations and Ask to Join.
+ *
+ * @return This Builder.
+ */
+ public Builder setJoinSecret(String joinSecret)
+ {
+ this.joinSecret = joinSecret;
+ return this;
+ }
+
+ /**
+ * Sets the unique hashed string for Spectate button.
+ *
+ * @param spectateSecret The unique hashed string for Spectate button.
+ *
+ * @return This Builder.
+ */
+ public Builder setSpectateSecret(String spectateSecret)
+ {
+ this.spectateSecret = spectateSecret;
+ return this;
+ }
+
+ /**
+ * Marks the {@link #setMatchSecret(String) matchSecret} as a game
+ * session with a specific beginning and end.
+ *
+ * @param instance Whether or not the {@code matchSecret} is a game
+ * with a specific beginning and end.
+ *
+ * @return This Builder.
+ */
+ public Builder setInstance(boolean instance)
+ {
+ this.instance = instance;
+ return this;
+ }
+ }
+}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/User.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/User.java
new file mode 100644
index 00000000..45231079
--- /dev/null
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/User.java
@@ -0,0 +1,207 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2023 cyoung06 (syeyoung)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+package kr.syeyoung.dungeonsguide.mod.discord;
+
+
+public class User
+{
+ private final String name;
+ private final String discriminator;
+ private final long id;
+ private final String avatar;
+ /**
+ * Constructs a new {@link User}.<br>
+ * Only implemented internally.
+ * @param name user's name
+ * @param discriminator user's discrim
+ * @param id user's id
+ * @param avatar user's avatar hash, or {@code null} if they have no avatar
+ */
+ public User(String name, String discriminator, long id, String avatar)
+ {
+ this.name = name;
+ this.discriminator = discriminator;
+ this.id = id;
+ this.avatar = avatar;
+ }
+
+ /**
+ * Gets the Users account name.
+ *
+ * @return The Users account name.
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Gets the Users discriminator.
+ *
+ * @return The Users discriminator.
+ */
+ public String getDiscriminator()
+ {
+ return discriminator;
+ }
+
+ /**
+ * Gets the Users Snowflake ID as a {@code long}.
+ *
+ * @return The Users Snowflake ID as a {@code long}.
+ */
+ public long getIdLong()
+ {
+ return id;
+ }
+
+ /**
+ * Gets the Users Snowflake ID as a {@code String}.
+ *
+ * @return The Users Snowflake ID as a {@code String}.
+ */
+ public String getId()
+ {
+ return Long.toString(id);
+ }
+
+ /**
+ * Gets the Users avatar ID.
+ *
+ * @return The Users avatar ID.
+ */
+ public String getAvatarId()
+ {
+ return avatar;
+ }
+
+ /**
+ * Gets the Users avatar URL.
+ *
+ * @return The Users avatar URL.
+ */
+ public String getAvatarUrl()
+ {
+ return getAvatarId() == null ? null : "https://cdn.discord.com/avatars/" + getId() + "/" + getAvatarId()
+ + (getAvatarId().startsWith("a_") ? ".gif" : ".png");
+ }
+
+ /**
+ * Gets the Users {@link DefaultAvatar} avatar ID.
+ *
+ * @return The Users {@link DefaultAvatar} avatar ID.
+ */
+ public String getDefaultAvatarId()
+ {
+ return DefaultAvatar.values()[Integer.parseInt(getDiscriminator()) % DefaultAvatar.values().length].toString();
+ }
+
+ /**
+ * Gets the Users {@link DefaultAvatar} avatar URL.
+ *
+ * @return The Users {@link DefaultAvatar} avatar URL.
+ */
+ public String getDefaultAvatarUrl()
+ {
+ return "https://discord.com/assets/" + getDefaultAvatarId() + ".png";
+ }
+
+ /**
+ * Gets the Users avatar URL, or their {@link DefaultAvatar} avatar URL if they
+ * do not have a custom avatar set on their account.
+ *
+ * @return The Users effective avatar URL.
+ */
+ public String getEffectiveAvatarUrl()
+ {
+ return getAvatarUrl() == null ? getDefaultAvatarUrl() : getAvatarUrl();
+ }
+
+ /**
+ * Gets whether or not this User is a bot.<p>
+ *
+ * While, at the time of writing this documentation, bots cannot
+ * use Rich Presence features, there may be a time in the future
+ * where they have such an ability.
+ *
+ * @return False
+ */
+ public boolean isBot()
+ {
+ return false; //bots cannot use RPC
+ }
+
+ /**
+ * Gets the User as a discord formatted mention.<p>
+ *
+ * {@code <@SNOWFLAKE_ID> }
+ *
+ * @return A discord formatted mention of this User.
+ */
+ public String getAsMention()
+ {
+ return "<@" + id + '>';
+ }
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (!(o instanceof User))
+ return false;
+ User oUser = (User) o;
+ return this == oUser || this.id == oUser.id;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return Long.hashCode(id);
+ }
+
+ @Override
+ public String toString()
+ {
+ return "U:" + getName() + '(' + id + ')';
+ }
+
+ /**
+ * Constants representing one of five different
+ * default avatars a {@link User} can have.
+ */
+ public enum DefaultAvatar
+ {
+ BLURPLE("6debd47ed13483642cf09e832ed0bc1b"),
+ GREY("322c936a8c8be1b803cd94861bdfa868"),
+ GREEN("dd4dbc0016779df1378e7812eabaa04d"),
+ ORANGE("0e291f67c9274a1abdddeb3fd919cbaa"),
+ RED("1cbd08c76f8af6dddce02c5138971129");
+
+ private final String text;
+
+ DefaultAvatar(String text)
+ {
+ this.text = text;
+ }
+
+ @Override
+ public String toString()
+ {
+ return text;
+ }
+ }
+}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java
deleted file mode 100644
index 0a48ad21..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk;
-
-import com.sun.jna.*;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.GameSDKTypeMapper;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import lombok.Getter;
-import net.minecraftforge.fml.relauncher.ReflectionHelper;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.file.Files;
-import java.nio.file.StandardCopyOption;
-import java.util.Collections;
-import java.util.Map;
-
-public class GameSDK {
- @Getter
- private static NativeGameSDK nativeGameSDK;
-
- static {
- try {
- if (System.getProperty("dg.safe") == null) extractLibrary();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- public static void extractLibrary() throws IOException {
- String libName = System.mapLibraryName("discord_game_sdk");
- String dir = "";
- switch(Platform.getOSType()) {
- case Platform.MAC:
- dir = "darwin";
- break;
- case Platform.LINUX:
- dir = "linux";
- break;
- case Platform.WINDOWS:
- if (Platform.is64Bit()) dir = "win-x64";
- else dir = "win-x86";
- break;
- default:
- throw new IllegalStateException("Unsupported OS Type");
- }
-
- String resourceLoc = "/gamesdk/"+dir+"/"+libName;
- File targetExtractionPath = new File("native/"+libName);
- targetExtractionPath.getParentFile().mkdirs();
- try (InputStream is = GameSDK.class.getResourceAsStream(resourceLoc)) {
- Files.copy(is, targetExtractionPath.toPath(), StandardCopyOption.REPLACE_EXISTING);
- targetExtractionPath.deleteOnExit();
- }
-
- nativeGameSDK = (NativeGameSDK) Native.loadLibrary(targetExtractionPath.getAbsolutePath(), NativeGameSDK.class,
- Collections.singletonMap(Library.OPTION_TYPE_MAPPER, GameSDKTypeMapper.INSTANCE));
- }
-
- public static void cleanup() {
- nativeGameSDK = null;
- Map options = ReflectionHelper.getPrivateValue(Native.class, null, "options");
- options.clear();
- try {
- Map callbackMap = ReflectionHelper.<Map, Object>getPrivateValue(
- (Class<? super Object>) Class.forName("com.sun.jna.CallbackReference"),
- null,
- "callbackMap"
- );
- callbackMap.clear();
- } catch (ClassNotFoundException e) {
- }
-
- Map infos = ReflectionHelper.getPrivateValue(Structure.class, null, "layoutInfo");
- infos.clear();
- Map alignments = ReflectionHelper.getPrivateValue(Native.class, null, "alignments");
- alignments.clear();
- Map<Class, TypeMapper> typeMapperMap = ReflectionHelper.getPrivateValue(Native.class, null, "typeMappers");
- typeMapperMap.clear();
- }
-
- public static void writeString(byte[] bts, String str) {
- System.arraycopy(str.getBytes(), 0, bts, 0, str.getBytes().length);
- bts[str.getBytes().length] = 0;
- }
- public static String readString(byte[] bts) {
- int i;
- for (i = 0; i < bts.length && bts[i] != 0; i++);
- byte[] asdasd = new byte[i];
- System.arraycopy(bts, 0, asdasd, 0, i);
- return new String(asdasd);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/GameSDKTypeMapper.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/GameSDKTypeMapper.java
deleted file mode 100644
index 78e0b7bb..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/GameSDKTypeMapper.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna;
-
-import com.sun.jna.DefaultTypeMapper;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.*;
-
-
-public class GameSDKTypeMapper extends DefaultTypeMapper {
- public static final GameSDKTypeMapper INSTANCE = new GameSDKTypeMapper();
- private GameSDKTypeMapper() {
- addTypeConverter(EDiscordResult.class, new EDiscordResult.EDiscordResultTypeConverter());
- addTypeConverter(EDiscordCreateFlags.class, new EDiscordCreateFlags.EDiscordCreateFlagsTypeConverter());
- addTypeConverter(EDiscordLogLevel.class, new EDiscordLogLevel.EDiscordLogLevelTypeConverter());
- addTypeConverter(EDiscordUserFlag.class, new EDiscordUserFlag.EDiscordUserFlagTypeConverter());
- addTypeConverter(EDiscordPremiumType.class, new EDiscordPremiumType.EDiscordPremiumTypeTypeConverter());
- addTypeConverter(EDiscordImageType.class, new EDiscordImageType.EDiscordImageTypeTypeConverter());
- addTypeConverter(EDiscordActivityType.class, new EDiscordActivityType.EDiscordActivityTypeTypeConverter());
- addTypeConverter(EDiscordActivityActionType.class, new EDiscordActivityActionType.EDiscordActivityActionTypeTypeConverter());
- addTypeConverter(EDiscordActivityJoinRequestReply.class, new EDiscordActivityJoinRequestReply.EDiscordActivityJoinRequestReplyTypeConverter());
- addTypeConverter(EDiscordStatus.class, new EDiscordStatus.EDiscordStatusTypeConverter());
- addTypeConverter(EDiscordRelationshipType.class, new EDiscordRelationshipType.EDiscordRelationshipTypeTypeConverter());
- addTypeConverter(EDiscordLobbyType.class, new EDiscordLobbyType.EDiscordLobbyTypeTypeConverter());
- addTypeConverter(EDiscordLobbySearchComparison.class, new EDiscordLobbySearchComparison.EDiscordLobbySearchComparisonTypeConverter());
- addTypeConverter(EDiscordLobbySearchCast.class, new EDiscordLobbySearchCast.EDiscordLobbySearchCastTypeConverter());
- addTypeConverter(EDiscordLobbySearchDistance.class, new EDiscordLobbySearchDistance.EDiscordLobbySearchDistanceTypeConverter());
- addTypeConverter(EDiscordEntitlementType.class, new EDiscordEntitlementType.EDiscordEntitlementTypeTypeConverter());
- addTypeConverter(EDiscordSkuType.class, new EDiscordSkuType.EDiscordSkuTypeTypeConverter());
- addTypeConverter(EDiscordInputModeType.class, new EDiscordInputModeType.EDiscordInputModeTypeTypeConverter());
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/NativeGameSDK.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/NativeGameSDK.java
deleted file mode 100644
index b11f141c..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/NativeGameSDK.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna;
-
-import com.sun.jna.Callback;
-import com.sun.jna.Library;
-import com.sun.jna.Pointer;
-import com.sun.jna.ptr.PointerByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordCreateParams;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordVersion;
-
-public interface NativeGameSDK extends Library {
-
- public static final int DISCORD_VERSION = 2;
- public static final int DISCORD_APPLICATION_MANAGER_VERSION = 1;
- public static final int DISCORD_USER_MANAGER_VERSION = 1;
- public static final int DISCORD_IMAGE_MANAGER_VERSION = 1;
- public static final int DISCORD_ACTIVITY_MANAGER_VERSION = 1;
- public static final int DISCORD_RELATIONSHIP_MANAGER_VERSION = 1;
- public static final int DISCORD_LOBBY_MANAGER_VERSION = 1;
- public static final int DISCORD_NETWORK_MANAGER_VERSION = 1;
- public static final int DISCORD_OVERLAY_MANAGER_VERSION = 1;
- public static final int DISCORD_STORAGE_MANAGER_VERSION = 1;
- public static final int DISCORD_STORE_MANAGER_VERSION = 1;
- public static final int DISCORD_VOICE_MANAGER_VERSION = 1;
- public static final int DISCORD_ACHIEVEMENT_MANAGER_VERSION = 1;
-
- EDiscordResult DiscordCreate(DiscordVersion version, DiscordCreateParams params, PointerByReference result); // result is double pointer of IDiscordCore
-
- interface DiscordCallback extends Callback {
- void callback(Pointer callbackData, EDiscordResult result);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivity.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivity.java
deleted file mode 100644
index 3bd0c612..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivity.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int64;
-
-import java.util.Arrays;
-import java.util.List;
-
-
-public class DiscordActivity extends DiscordStruct {
- public EDiscordActivityType activityType = EDiscordActivityType.DiscordActivityType_Playing;
- public Int64 applicationId = new Int64();
- public byte[] name = new byte[128];
- public byte[] state = new byte[128];
- public byte[] details = new byte[128];
- public DiscordActivityTimestamps timestamps;
- public DiscordActivityAssets assets;
- public DiscordActivityParty party;
- public DiscordActivitySecrets secrets;
- public boolean instance;
- public DiscordActivity() {super();} public DiscordActivity(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordActivity implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordActivity implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("activityType", "applicationId", "name", "state", "details", "timestamps", "assets", "party", "secrets", "instance");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityAssets.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityAssets.java
deleted file mode 100644
index fe9bf1ca..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityAssets.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-
-import java.util.Arrays;
-import java.util.List;
-
-
-public class DiscordActivityAssets extends DiscordStruct{
- public byte[] large_image = new byte[128];
- public byte[] large_text = new byte[128];
- public byte[] small_image = new byte[128];
- public byte[] small_text = new byte[128];
- public DiscordActivityAssets() {super();}public DiscordActivityAssets(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordActivityAssets implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordActivityAssets implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("large_image", "large_text", "small_image", "small_text");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityParty.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityParty.java
deleted file mode 100644
index ee0730af..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityParty.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-
-import java.util.Arrays;
-import java.util.List;
-
-
-public class DiscordActivityParty extends DiscordStruct {
- public byte[] id = new byte[128];
- public DiscordPartySize discordActivityParty;
- public DiscordActivityParty() {super();} public DiscordActivityParty(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordActivityParty implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordActivityParty implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("id", "discordActivityParty");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivitySecrets.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivitySecrets.java
deleted file mode 100644
index 6a43412c..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivitySecrets.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-
-import java.util.Arrays;
-import java.util.List;
-
-
-public class DiscordActivitySecrets extends DiscordStruct {
- public byte[] match = new byte[128];
- public byte[] join = new byte[128];
- public byte[] spectate = new byte[128];
- public DiscordActivitySecrets() {super();} public DiscordActivitySecrets(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordActivitySecrets implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordActivitySecrets implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("match", "join", "spectate");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityTimestamps.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityTimestamps.java
deleted file mode 100644
index 8a8d06b8..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityTimestamps.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordTimestamp;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordActivityTimestamps extends DiscordStruct {
- public DiscordTimestamp start = new DiscordTimestamp();
- public DiscordTimestamp end = new DiscordTimestamp();
- public DiscordActivityTimestamps() {super();} public DiscordActivityTimestamps(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordActivityTimestamps implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordActivityTimestamps implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("start", "end");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordCreateParams.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordCreateParams.java
deleted file mode 100644
index 9c7e15a9..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordCreateParams.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct.*;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordClientID;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordVersion;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt64;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordCreateParams extends DiscordStruct { public DiscordCreateParams() {super();} public DiscordCreateParams(Pointer pointer) {super(pointer);}
- public DiscordClientID client_id = new DiscordClientID();
- public UInt64 flags = new UInt64();
- public Pointer events; // void*
- public Pointer event_data; // void*
- public Pointer application_events;
- public DiscordVersion application_version = new DiscordVersion(NativeGameSDK.DISCORD_APPLICATION_MANAGER_VERSION);
- public IDiscordUserEvents.ByReference user_events;
- public DiscordVersion user_version= new DiscordVersion(NativeGameSDK.DISCORD_USER_MANAGER_VERSION);
- public Pointer image_events;// void*
- public DiscordVersion image_version= new DiscordVersion(NativeGameSDK.DISCORD_IMAGE_MANAGER_VERSION);
- public IDiscordActivityEvents.ByReference activity_events;
- public DiscordVersion activity_version= new DiscordVersion(NativeGameSDK.DISCORD_ACTIVITY_MANAGER_VERSION);
- public IDiscordRelationshipEvents.ByReference relationship_events;
- public DiscordVersion relationship_version= new DiscordVersion(NativeGameSDK.DISCORD_RELATIONSHIP_MANAGER_VERSION);
- public IDiscordLobbyEvents.ByReference lobby_events;
- public DiscordVersion lobby_version= new DiscordVersion(NativeGameSDK.DISCORD_LOBBY_MANAGER_VERSION);
- public IDiscordNetworkEvents.ByReference network_events;
- public DiscordVersion network_version= new DiscordVersion(NativeGameSDK.DISCORD_NETWORK_MANAGER_VERSION);
- public IDiscordOverlayEvents.ByReference overlay_events;
- public DiscordVersion overlay_version= new DiscordVersion(NativeGameSDK.DISCORD_OVERLAY_MANAGER_VERSION);
- public Pointer storage_events;// void*
- public DiscordVersion storage_version= new DiscordVersion(NativeGameSDK.DISCORD_STORAGE_MANAGER_VERSION);
- public IDiscordStoreEvents.ByReference store_events;
- public DiscordVersion store_version= new DiscordVersion(NativeGameSDK.DISCORD_STORE_MANAGER_VERSION);
- public IDiscordVoiceEvents.ByReference voice_events;
- public DiscordVersion voice_version= new DiscordVersion(NativeGameSDK.DISCORD_VOICE_MANAGER_VERSION);
- public IDiscordAchievementEvents.ByReference achievement_events;
- public DiscordVersion achievement_version= new DiscordVersion(NativeGameSDK.DISCORD_ACHIEVEMENT_MANAGER_VERSION);
-
- public static class ByReference extends DiscordCreateParams implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordCreateParams implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("client_id", "flags", "events", "event_data", "application_events", "application_version", "user_events",
- "user_version", "image_events", "image_version", "activity_events", "activity_version", "lobby_events", "lobby_version",
- "network_events", "network_version", "overlay_events", "overlay_version", "storage_events", "storage_version", "store_events",
- "store_version", "voice_events", "voice_version", "achievement_events", "achievement_version");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordEntitlement.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordEntitlement.java
deleted file mode 100644
index 85ef593b..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordEntitlement.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordEntitlementType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordEntitlement extends DiscordStruct {
- public DiscordSnowflake id = new DiscordSnowflake();
- public EDiscordEntitlementType type = EDiscordEntitlementType.DiscordEntitlementType_Purchase;
- public DiscordSnowflake sku_id = new DiscordSnowflake();
- public DiscordEntitlement() {super();} public DiscordEntitlement(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordEntitlement implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordEntitlement implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("id", "type", "sku_id");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordFileStat.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordFileStat.java
deleted file mode 100644
index 58c1832c..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordFileStat.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt64;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordFileStat extends DiscordStruct {
- public byte[] filename = new byte[260];
- public UInt64 size = new UInt64();
- public UInt64 last_modified = new UInt64();
- public DiscordFileStat() {super();} public DiscordFileStat(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordFileStat implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordFileStat implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("filename", "size", "last_modified");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageDimensions.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageDimensions.java
deleted file mode 100644
index c6a55c42..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageDimensions.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordImageDimensions extends DiscordStruct {
- public UInt32 width = new UInt32();
- public UInt32 height = new UInt32();
- public DiscordImageDimensions() {super();} public DiscordImageDimensions(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordImageDimensions implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) { super(pointer);}}
- public static class ByValue extends DiscordImageDimensions implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) { super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("width", "height");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageHandle.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageHandle.java
deleted file mode 100644
index c52dfebc..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageHandle.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordImageType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int64;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordImageHandle extends DiscordStruct {
- public EDiscordImageType type = EDiscordImageType.DiscordImageType_User;
- public Int64 id = new Int64();
- public UInt32 size = new UInt32();
- public DiscordImageHandle() {super();} public DiscordImageHandle(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordImageHandle implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordImageHandle implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("type", "id", "size");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordInputMode.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordInputMode.java
deleted file mode 100644
index d0b8589b..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordInputMode.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordInputModeType;
-
-import java.util.Arrays;
-import java.util.List;
-
-
-public class DiscordInputMode extends DiscordStruct {
- public EDiscordInputModeType type = EDiscordInputModeType.DiscordInputModeType_PushToTalk;
- public byte[] shortcut = new byte[256];
- public DiscordInputMode() {super();} public DiscordInputMode(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordInputMode implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordInputMode implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("type", "shortcut");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordLobby.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordLobby.java
deleted file mode 100644
index aa2f144f..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordLobby.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbyType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordLobby extends DiscordStruct {
- public DiscordSnowflake id = new DiscordSnowflake();
- public EDiscordLobbyType type = EDiscordLobbyType.DiscordLobbyType_Private;
- public DiscordSnowflake owner_id = new DiscordSnowflake();
- public byte[] secret = new byte[128];
- public UInt32 capacity = new UInt32();
- public boolean locked;
- public DiscordLobby() {super();} public DiscordLobby(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordLobby implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordLobby implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("id", "type", "owner_id", "secret", "capacity", "locked");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordOAuth2Token.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordOAuth2Token.java
deleted file mode 100644
index 937b23de..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordOAuth2Token.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordTimestamp;
-
-import java.util.Arrays;
-import java.util.List;
-
-
-public class DiscordOAuth2Token extends DiscordStruct {
- public byte[] access_token = new byte[128];
- public byte[] scopes = new byte[1024];
- public DiscordTimestamp expires = new DiscordTimestamp();
- public DiscordOAuth2Token() {super();} public DiscordOAuth2Token(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordOAuth2Token implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordOAuth2Token implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("access_token", "scopes", "expires");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPartySize.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPartySize.java
deleted file mode 100644
index 522efeaa..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPartySize.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordPartySize extends DiscordStruct{
- public Int32 current_size = new Int32();
- public Int32 max_size = new Int32();
- public DiscordPartySize() {super();} public DiscordPartySize(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordPartySize implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordPartySize implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("current_size", "max_size");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPresence.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPresence.java
deleted file mode 100644
index b5fc0f0e..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPresence.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordStatus;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordPresence extends DiscordStruct {
- public EDiscordStatus status = EDiscordStatus.DiscordStatus_Offline;
- public DiscordActivity activity;
- public DiscordPresence() {super();} public DiscordPresence(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordPresence implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordPresence implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("status", "activity");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordRelationship.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordRelationship.java
deleted file mode 100644
index 4115e684..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordRelationship.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordRelationshipType;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordRelationship extends DiscordStruct {
- public EDiscordRelationshipType type = EDiscordRelationshipType.DiscordRelationshipType_None;
- public DiscordUser user;
- public DiscordPresence presence;
- public DiscordRelationship() {super();} public DiscordRelationship(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordRelationship implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordRelationship implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("type", "user", "presence");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSku.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSku.java
deleted file mode 100644
index bfd90e22..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSku.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordSkuType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-
-import java.util.Arrays;
-import java.util.List;
-
-
-public class DiscordSku extends DiscordStruct {
- public DiscordSnowflake id = new DiscordSnowflake();
- public EDiscordSkuType type = EDiscordSkuType.DiscordSkuType_Application;
- public byte[] name = new byte[256];
- public DiscordSkuPrice discordSkuPrice;
- public DiscordSku() {super();} public DiscordSku(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordSku implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordSku implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("id", "type", "name", "discordSkuPrice");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSkuPrice.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSkuPrice.java
deleted file mode 100644
index 234c0039..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSkuPrice.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordSkuPrice extends DiscordStruct {
- public UInt32 amount = new UInt32();
- public byte[] currency = new byte[16];
- public DiscordSkuPrice() {super();} public DiscordSkuPrice(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordSkuPrice implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordSkuPrice implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("amount", "currency");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordStruct.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordStruct.java
deleted file mode 100644
index 12292692..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordStruct.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Library;
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.GameSDKTypeMapper;
-
-import java.util.Collections;
-import java.util.Map;
-
-public abstract class DiscordStruct extends Structure {
- public static final Map<String, Object> OPTIONS = Collections.singletonMap(Library.OPTION_TYPE_MAPPER, GameSDKTypeMapper.INSTANCE);
- protected DiscordStruct() {
- super(GameSDKTypeMapper.INSTANCE);
- }
- protected DiscordStruct(Pointer p) {super(p); read();}
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUser.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUser.java
deleted file mode 100644
index 3db714dc..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUser.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordUser extends DiscordStruct {
- public DiscordSnowflake id = new DiscordSnowflake();
- public byte[] username = new byte[256];
- public byte[] discriminator = new byte[8];
- public byte[] avatar = new byte[128];
- public boolean bot;
- public DiscordUser() {super();} public DiscordUser(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordUser implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordUser implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("id", "username", "discriminator", "avatar", "bot");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUserAchievement.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUserAchievement.java
deleted file mode 100644
index 52b87ace..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUserAchievement.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class DiscordUserAchievement extends DiscordStruct {
- public DiscordSnowflake user_id = new DiscordSnowflake();
- public DiscordSnowflake achievement_id = new DiscordSnowflake();
- public UInt32 percent_complete = new UInt32();
- public byte[] unlocked_at = new byte[64];
- public DiscordUserAchievement() {super();} public DiscordUserAchievement(Pointer pointer) {super(pointer);}
-
- public static class ByReference extends DiscordUserAchievement implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends DiscordUserAchievement implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override
- protected List getFieldOrder() {
- return Arrays.asList("user_id", "achievement_id", "percent_complete", "unlocked_at");
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityActionType.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityActionType.java
deleted file mode 100644
index 9004c339..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityActionType.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordActivityActionType {
- DiscordActivityActionType_Join(1),
- DiscordActivityActionType_Spectate(2);
-
- @Getter
- private final int value;
- private EDiscordActivityActionType(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordActivityActionType> valueMap = new HashMap<>();
- static {
- for (EDiscordActivityActionType value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordActivityActionType fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordActivityActionTypeTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordActivityActionType.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordActivityActionType)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java
deleted file mode 100644
index 43f0c0ef..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordActivityJoinRequestReply {
- DiscordActivityJoinRequestReply_No(0),
- DiscordActivityJoinRequestReply_Yes(1),
- DiscordActivityJoinRequestReply_Ignore(2);
-
- @Getter
- private final int value;
- private EDiscordActivityJoinRequestReply(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordActivityJoinRequestReply> valueMap = new HashMap<>();
- static {
- for (EDiscordActivityJoinRequestReply value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordActivityJoinRequestReply fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordActivityJoinRequestReplyTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordActivityJoinRequestReply.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordActivityJoinRequestReply)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityType.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityType.java
deleted file mode 100644
index 7ed2ec54..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityType.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordActivityType {
- DiscordActivityType_Playing(0),
- DiscordActivityType_Streaming(1),
- DiscordActivityType_Listening(2),
- DiscordActivityType_Watching(3);
-
- @Getter
- private final int value;
- private EDiscordActivityType(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordActivityType> valueMap = new HashMap<>();
- static {
- for (EDiscordActivityType value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordActivityType fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordActivityTypeTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordActivityType.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordActivityType)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordCreateFlags.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordCreateFlags.java
deleted file mode 100644
index 60606213..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordCreateFlags.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordCreateFlags {
- DiscordCreateFlags_Default(0),
- DiscordCreateFlags_NoRequireDiscord(1);
-
- @Getter
- private final int value;
- private EDiscordCreateFlags(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordCreateFlags> valueMap = new HashMap<>();
- static {
- for (EDiscordCreateFlags value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordCreateFlags fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordCreateFlagsTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordCreateFlags.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordCreateFlags)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordEntitlementType.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordEntitlementType.java
deleted file mode 100644
index 85150f0a..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordEntitlementType.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordEntitlementType {
- DiscordEntitlementType_Purchase(1),
- DiscordEntitlementType_PremiumSubscription(2),
- DiscordEntitlementType_DeveloperGift(3),
- DiscordEntitlementType_TestModePurchase(4),
- DiscordEntitlementType_FreePurchase(5),
- DiscordEntitlementType_UserGift(6),
- DiscordEntitlementType_PremiumPurchase(7);
-
- @Getter
- private final int value;
- private EDiscordEntitlementType(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordEntitlementType> valueMap = new HashMap<>();
- static {
- for (EDiscordEntitlementType value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordEntitlementType fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordEntitlementTypeTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordEntitlementType.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordEntitlementType)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordImageType.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordImageType.java
deleted file mode 100644
index f516e1a9..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordImageType.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordImageType {
- DiscordImageType_User(0);
-
- @Getter
- private final int value;
- private EDiscordImageType(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordImageType> valueMap = new HashMap<>();
- static {
- for (EDiscordImageType value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordImageType fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordImageTypeTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordImageType.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
-
- if (value == null) return 0;return ((EDiscordImageType)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordInputModeType.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordInputModeType.java
deleted file mode 100644
index aeba1c22..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordInputModeType.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordInputModeType {
- DiscordInputModeType_VoiceActivity(0),
- DiscordInputModeType_PushToTalk(1);
-
- @Getter
- private final int value;
- private EDiscordInputModeType(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordInputModeType> valueMap = new HashMap<>();
- static {
- for (EDiscordInputModeType value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordInputModeType fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordInputModeTypeTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordInputModeType.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordInputModeType)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java
deleted file mode 100644
index d2c78f39..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordLobbySearchCast {
- DiscordLobbySearchCast_String(1),
- DiscordLobbySearchCast_Number(2);
-
- @Getter
- private final int value;
- private EDiscordLobbySearchCast(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordLobbySearchCast> valueMap = new HashMap<>();
- static {
- for (EDiscordLobbySearchCast value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordLobbySearchCast fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordLobbySearchCastTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordLobbySearchCast.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordLobbySearchCast)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java
deleted file mode 100644
index 9a8819d4..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordLobbySearchComparison {
- DiscordLobbySearchComparison_LessThanOrEqual(-2),
- DiscordLobbySearchComparison_LessThan(-1),
- DiscordLobbySearchComparison_Equal(0),
- DiscordLobbySearchComparison_GreaterThan(1),
- DiscordLobbySearchComparison_GreaterThanOrEqual(2),
- DiscordLobbySearchComparison_NotEqual(3);
-
- @Getter
- private final int value;
- private EDiscordLobbySearchComparison(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordLobbySearchComparison> valueMap = new HashMap<>();
- static {
- for (EDiscordLobbySearchComparison value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordLobbySearchComparison fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordLobbySearchComparisonTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordLobbySearchComparison.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordLobbySearchComparison)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java
deleted file mode 100644
index 5e4927ee..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordLobbySearchDistance {
- DiscordLobbySearchDistance_Local(0),
- DiscordLobbySearchDistance_Default(1),
- DiscordLobbySearchDistance_Extended(2),
- DiscordLobbySearchDistance_Global(3);
-
- @Getter
- private final int value;
- private EDiscordLobbySearchDistance(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordLobbySearchDistance> valueMap = new HashMap<>();
- static {
- for (EDiscordLobbySearchDistance value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordLobbySearchDistance fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordLobbySearchDistanceTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordLobbySearchDistance.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordLobbySearchDistance)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbyType.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbyType.java
deleted file mode 100644
index 62b7c154..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbyType.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordLobbyType {
- DiscordLobbyType_Private(1),
- DiscordLobbyType_Public(2);
-
- @Getter
- private final int value;
- private EDiscordLobbyType(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordLobbyType> valueMap = new HashMap<>();
- static {
- for (EDiscordLobbyType value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordLobbyType fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordLobbyTypeTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordLobbyType.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
-
- if (value == null) return 0;return ((EDiscordLobbyType)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLogLevel.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLogLevel.java
deleted file mode 100644
index 8487a0e6..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLogLevel.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordLogLevel {
- DiscordLogLevel_Error(1),
- DiscordLogLevel_Warn(2),
- DiscordLogLevel_Info(3),
- DiscordLogLevel_Debug(4);
-
- @Getter
- private final int value;
- private EDiscordLogLevel(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordLogLevel> valueMap = new HashMap<>();
- static {
- for (EDiscordLogLevel value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordLogLevel fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordLogLevelTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordLogLevel.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
-
- if (value == null) return 0;return ((EDiscordLogLevel)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordPremiumType.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordPremiumType.java
deleted file mode 100644
index 139264b1..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordPremiumType.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordPremiumType {
- DiscordPremiumType_None(0),
- DiscordPremiumType_Tier1(1),
- DiscordPremiumType_Tier2(2);
-
- @Getter
- private final int value;
- private EDiscordPremiumType(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordPremiumType> valueMap = new HashMap<>();
- static {
- for (EDiscordPremiumType value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordPremiumType fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordPremiumTypeTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordPremiumType.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordPremiumType)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordRelationshipType.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordRelationshipType.java
deleted file mode 100644
index ddc5cadb..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordRelationshipType.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordRelationshipType {
- DiscordRelationshipType_None(0),
- DiscordRelationshipType_Friend(1),
- DiscordRelationshipType_Blocked(2),
- DiscordRelationshipType_PendingIncoming(3),
- DiscordRelationshipType_PendingOutgoing(4),
- DiscordRelationshipType_Implicit(5);
-
- @Getter
- private final int value;
- private EDiscordRelationshipType(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordRelationshipType> valueMap = new HashMap<>();
- static {
- for (EDiscordRelationshipType value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordRelationshipType fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordRelationshipTypeTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordRelationshipType.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordRelationshipType)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordResult.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordResult.java
deleted file mode 100644
index 9447fc58..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordResult.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordResult {
- DiscordResult_Ok(0),
- DiscordResult_ServiceUnavailable(1),
- DiscordResult_InvalidVersion(2),
- DiscordResult_LockFailed(3),
- DiscordResult_InternalError(4),
- DiscordResult_InvalidPayload(5),
- DiscordResult_InvalidCommand(6),
- DiscordResult_InvalidPermissions(7),
- DiscordResult_NotFetched(8),
- DiscordResult_NotFound(9),
- DiscordResult_Conflict(10),
- DiscordResult_InvalidSecret(11),
- DiscordResult_InvalidJoinSecret(12),
- DiscordResult_NoEligibleActivity(13),
- DiscordResult_InvalidInvite(14),
- DiscordResult_NotAuthenticated(15),
- DiscordResult_InvalidAccessToken(16),
- DiscordResult_ApplicationMismatch(17),
- DiscordResult_InvalidDataUrl(18),
- DiscordResult_InvalidBase64(19),
- DiscordResult_NotFiltered(20),
- DiscordResult_LobbyFull(21),
- DiscordResult_InvalidLobbySecret(22),
- DiscordResult_InvalidFilename(23),
- DiscordResult_InvalidFileSize(24),
- DiscordResult_InvalidEntitlement(25),
- DiscordResult_NotInstalled(26),
- DiscordResult_NotRunning(27),
- DiscordResult_InsufficientBuffer(28),
- DiscordResult_PurchaseCanceled(29),
- DiscordResult_InvalidGuild(30),
- DiscordResult_InvalidEvent(31),
- DiscordResult_InvalidChannel(32),
- DiscordResult_InvalidOrigin(33),
- DiscordResult_RateLimited(34),
- DiscordResult_OAuth2Error(35),
- DiscordResult_SelectChannelTimeout(36),
- DiscordResult_GetGuildTimeout(37),
- DiscordResult_SelectVoiceForceRequired(38),
- DiscordResult_CaptureShortcutAlreadyListening(39),
- DiscordResult_UnauthorizedForAchievement(40),
- DiscordResult_InvalidGiftCode(41),
- DiscordResult_PurchaseError(42),
- DiscordResult_TransactionAborted(43);
-
- @Getter
- private final int value;
- private EDiscordResult(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordResult> valueMap = new HashMap<>();
- static {
- for (EDiscordResult value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordResult fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordResultTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordResult.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordResult)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordSkuType.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordSkuType.java
deleted file mode 100644
index 69442f2d..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordSkuType.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordSkuType {
- DiscordSkuType_Application(1),
- DiscordSkuType_DLC(2),
- DiscordSkuType_Consumable(3),
- DiscordSkuType_Bundle(4);
-
- @Getter
- private final int value;
- private EDiscordSkuType(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordSkuType> valueMap = new HashMap<>();
- static {
- for (EDiscordSkuType value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordSkuType fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordSkuTypeTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordSkuType.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
-
- if (value == null) return 0;return ((EDiscordSkuType)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordStatus.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordStatus.java
deleted file mode 100644
index 0ef1892e..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordStatus.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordStatus {
- DiscordStatus_Offline(0),
- DiscordStatus_Online(1),
- DiscordStatus_Idle(2),
- DiscordStatus_DoNotDisturb(3);
-
- @Getter
- private final int value;
- private EDiscordStatus(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordStatus> valueMap = new HashMap<>();
- static {
- for (EDiscordStatus value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordStatus fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordStatusTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordStatus.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
-
- if (value == null) return 0;return ((EDiscordStatus)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordUserFlag.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordUserFlag.java
deleted file mode 100644
index 1ba8f40f..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordUserFlag.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
-
-import com.sun.jna.FromNativeContext;
-import com.sun.jna.ToNativeContext;
-import com.sun.jna.TypeConverter;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum EDiscordUserFlag {
- DiscordUserFlag_Partner(2),
- DiscordUserFlag_HypeSquadEvents(4),
- DiscordUserFlag_HypeSquadHouse1(64),
- DiscordUserFlag_HypeSquadHouse2(128),
- DiscordUserFlag_HypeSquadHouse3(256);
-
- @Getter
- private final int value;
- private EDiscordUserFlag(int value) {
- this.value = value;
- }
-
- private static final Map<Integer,EDiscordUserFlag> valueMap = new HashMap<>();
- static {
- for (EDiscordUserFlag value : values()) {
- valueMap.put(value.value, value);
- }
- }
-
- public static EDiscordUserFlag fromValue(int value) {
- return valueMap.get(value);
- }
-
- public static class EDiscordUserFlagTypeConverter implements TypeConverter {
- @Override
- public Object fromNative(Object nativeValue, FromNativeContext context) {
- return EDiscordUserFlag.fromValue((Integer)nativeValue);
- }
-
- @Override
- public Object toNative(Object value, ToNativeContext context) {
- if (value == null) return 0;
- return ((EDiscordUserFlag)value).getValue();
- }
-
- @Override
- public Class nativeType() {
- return Integer.class;
- }
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/GameSDKCallback.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/GameSDKCallback.java
deleted file mode 100644
index e997e699..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/GameSDKCallback.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Callback;
-import com.sun.jna.Library;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.GameSDKTypeMapper;
-
-import java.util.Collections;
-import java.util.Map;
-
-public interface GameSDKCallback extends Callback {
- public static final Map<String, Object> OPTIONS = Collections.singletonMap(Library.OPTION_TYPE_MAPPER, GameSDKTypeMapper.INSTANCE);
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java
deleted file mode 100644
index a33adb16..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUserAchievement;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordAchievementEvents extends DiscordStruct { public IDiscordAchievementEvents() {super();} public IDiscordAchievementEvents(Pointer pointer) {super(pointer);}
- public interface OnUserAchievementUpdateCallback extends GameSDKCallback { void onUserAchievementUpdate(Pointer eventData, DiscordUserAchievement userAchievement); }
- public OnUserAchievementUpdateCallback OnUserAchievementUpdate;
-
-
-
- public static class ByReference extends IDiscordAchievementEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordAchievementEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("OnUserAchievementUpdate"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java
deleted file mode 100644
index 31cd93f8..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.IntByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUserAchievement;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt8;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordAchievementManager extends DiscordStruct { public IDiscordAchievementManager() {super();} public IDiscordAchievementManager(Pointer pointer) {super(pointer);}
- public interface SetUserAchievementCallback extends GameSDKCallback { void setUserAchievement(IDiscordAchievementManager manager, DiscordSnowflake achievementId, UInt8 percentComplete, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public SetUserAchievementCallback SetUserAchievement;
-
- public interface FetchUserAchievementsCallback extends GameSDKCallback { void fetchUserAchievements(IDiscordAchievementManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public FetchUserAchievementsCallback FetchUserAchievements;
-
- public interface CountUserAchievementsCallback extends GameSDKCallback { void countUserAchievements(IDiscordAchievementManager manager, IntByReference count); }
- public CountUserAchievementsCallback CountUserAchievements;
-
- public interface GetUserAchievementCallback extends GameSDKCallback { EDiscordResult getUserAchievement(IDiscordAchievementManager manager, DiscordSnowflake userAchievementId, DiscordUserAchievement userAchievement); }
- public GetUserAchievementCallback GetUserAchievement;
-
- public interface GetUserAchievementAtCallback extends GameSDKCallback { EDiscordResult getUserAchievementAt(IDiscordAchievementManager manager, Int32 index, DiscordUserAchievement userAchievement); }
- public GetUserAchievementAtCallback GetUserAchievementAt;
-
-
-
- public static class ByReference extends IDiscordAchievementManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordAchievementManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("SetUserAchievement", "FetchUserAchievements", "CountUserAchievements", "GetUserAchievement", "GetUserAchievementAt"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java
deleted file mode 100644
index b64ab1bb..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordActivity;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityActionType;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordActivityEvents extends DiscordStruct { public IDiscordActivityEvents() {super();} public IDiscordActivityEvents(Pointer pointer) {super(pointer);}
- public interface OnActivityJoinCallback extends GameSDKCallback { void onActivityJoin(Pointer eventData, String secret); }
- public OnActivityJoinCallback OnActivityJoin;
-
- public interface OnActivitySpectateCallback extends GameSDKCallback { void onActivitySpectate(Pointer eventData, String secret); }
- public OnActivitySpectateCallback OnActivitySpectate;
-
- public interface OnActivityJoinRequestCallback extends GameSDKCallback { void onActivityJoinRequest(Pointer eventData, DiscordUser user); }
- public OnActivityJoinRequestCallback OnActivityJoinRequest;
-
- public interface OnActivityInviteCallback extends GameSDKCallback { void onActivityInvite(Pointer eventData, EDiscordActivityActionType type, DiscordUser user, DiscordActivity activity); }
- public OnActivityInviteCallback OnActivityInvite;
-
-
-
- public static class ByReference extends IDiscordActivityEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordActivityEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("OnActivityJoin", "OnActivitySpectate", "OnActivityJoinRequest", "OnActivityInvite"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityManager.java
deleted file mode 100644
index db559e9c..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityManager.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordActivity;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityActionType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityJoinRequestReply;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordActivityManager extends DiscordStruct { public IDiscordActivityManager() {super();} public IDiscordActivityManager(Pointer pointer) {super(pointer);}
- public interface RegisterCommandCallback extends GameSDKCallback { EDiscordResult registerCommand(IDiscordActivityManager manager, String command); }
- public RegisterCommandCallback RegisterCommand;
-
- public interface RegisterSteamCallback extends GameSDKCallback { EDiscordResult registerSteam(IDiscordActivityManager manager, UInt32 steamId); }
- public RegisterSteamCallback RegisterSteam;
-
- public interface UpdateActivityCallback extends GameSDKCallback { void updateActivity(IDiscordActivityManager manager, DiscordActivity activity, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public UpdateActivityCallback UpdateActivity;
-
- public interface ClearActivityCallback extends GameSDKCallback { void clearActivity(IDiscordActivityManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public ClearActivityCallback ClearActivity;
-
- public interface SendRequestReplyCallback extends GameSDKCallback { void sendRequestReply(IDiscordActivityManager manager, DiscordSnowflake userId, EDiscordActivityJoinRequestReply reply, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public SendRequestReplyCallback SendRequestReply;
-
- public interface SendInviteCallback extends GameSDKCallback { void sendInvite(IDiscordActivityManager manager, DiscordSnowflake userId, EDiscordActivityActionType type, String content, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public SendInviteCallback SendInvite;
-
- public interface AcceptInviteCallback extends GameSDKCallback { void acceptInvite(IDiscordActivityManager manager, DiscordSnowflake userId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public AcceptInviteCallback AcceptInvite;
-
-
-
- public static class ByReference extends IDiscordActivityManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordActivityManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("RegisterCommand", "RegisterSteam", "UpdateActivity", "ClearActivity", "SendRequestReply", "SendInvite", "AcceptInvite"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java
deleted file mode 100644
index e9c04560..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordOAuth2Token;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordApplicationManager extends DiscordStruct { public IDiscordApplicationManager() {super();} public IDiscordApplicationManager(Pointer pointer) {super(pointer);}
- public interface ValidateOrExitCallback extends GameSDKCallback { void validateOrExit(IDiscordApplicationManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public ValidateOrExitCallback ValidateOrExit;
-
- public interface GetCurrentLocaleCallback extends GameSDKCallback { void getCurrentLocale(IDiscordApplicationManager manager, Pointer locale); } // len 128 memory
- public GetCurrentLocaleCallback GetCurrentLocale;
-
- public interface GetCurrentBranchCallback extends GameSDKCallback { void getCurrentBranch(IDiscordApplicationManager manager, Pointer branch); } // len 4096 mem
- public GetCurrentBranchCallback GetCurrentBranch;
-
- public interface GetOauth2TokenCallback extends GameSDKCallback { void getOauth2Token(IDiscordApplicationManager manager, Pointer callbackData, GetOauth2TokenCallback_Callback callback); }
- public interface GetOauth2TokenCallback_Callback extends GameSDKCallback {
- void callback(Pointer callbackData, EDiscordResult result, DiscordOAuth2Token oauthToken);
- }
-
- public GetOauth2TokenCallback GetOauth2Token;
-
- public interface GetTicketCallback extends GameSDKCallback { void getTicket(IDiscordApplicationManager manager, Pointer callbackData, GetTicketCallback_Callback callback); }
- public interface GetTicketCallback_Callback extends GameSDKCallback {
- void callback(Pointer callbackData, EDiscordResult result, String data);
- }
- public GetTicketCallback GetTicket;
-
-
-
- public static class ByReference extends IDiscordApplicationManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordApplicationManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("ValidateOrExit", "GetCurrentLocale", "GetCurrentBranch", "GetOauth2Token", "GetTicket"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordCore.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordCore.java
deleted file mode 100644
index 8aab4147..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordCore.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.TypeMapper;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.GameSDKTypeMapper;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLogLevel;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordCore extends DiscordStruct { public IDiscordCore() {super();} public IDiscordCore(Pointer pointer) {super(pointer);}
-
- public static final TypeMapper TYPE_MAPPER = GameSDKTypeMapper.INSTANCE;
- public interface DestroyCallback extends GameSDKCallback { void destroy(IDiscordCore core); }
- public DestroyCallback Destroy;
-
- public interface RunCallbacksCallback extends GameSDKCallback { EDiscordResult runCallbacks(IDiscordCore core); }
- public RunCallbacksCallback RunCallbacks;
-
- public interface SetLogHookCallback extends GameSDKCallback { void setLogHook(IDiscordCore core, EDiscordLogLevel minLevel, Pointer hookData, LogHook hook); }
- public interface LogHook extends GameSDKCallback {
- void hook(Pointer hookData, EDiscordLogLevel level, String message);
- }
- public SetLogHookCallback SetLogHook;
-
- public interface GetApplicationManagerCallback extends GameSDKCallback { IDiscordApplicationManager getApplicationManager(IDiscordCore core); }
- public GetApplicationManagerCallback GetApplicationManager;
-
- public interface GetUserManagerCallback extends GameSDKCallback { IDiscordUserManager getUserManager(IDiscordCore core); }
- public GetUserManagerCallback GetUserManager;
-
- public interface GetImageManagerCallback extends GameSDKCallback { IDiscordImageManager getImageManager(IDiscordCore core); }
- public GetImageManagerCallback GetImageManager;
-
- public interface GetActivityManagerCallback extends GameSDKCallback { IDiscordActivityManager getActivityManager(IDiscordCore core); }
- public GetActivityManagerCallback GetActivityManager;
-
- public interface GetRelationshipManagerCallback extends GameSDKCallback { IDiscordRelationshipManager getRelationshipManager(IDiscordCore core); }
- public GetRelationshipManagerCallback GetRelationshipManager;
-
- public interface GetLobbyManagerCallback extends GameSDKCallback { IDiscordLobbyManager getLobbyManager(IDiscordCore core); }
- public GetLobbyManagerCallback GetLobbyManager;
-
- public interface GetNetworkManagerCallback extends GameSDKCallback { IDiscordNetworkManager getNetworkManager(IDiscordCore core); }
- public GetNetworkManagerCallback GetNetworkManager;
-
- public interface GetOverlayManagerCallback extends GameSDKCallback { IDiscordOverlayManager getOverlayManager(IDiscordCore core); }
- public GetOverlayManagerCallback GetOverlayManager;
-
- public interface GetStorageManagerCallback extends GameSDKCallback { IDiscordStorageManager getStorageManager(IDiscordCore core); }
- public GetStorageManagerCallback GetStorageManager;
-
- public interface GetStoreManagerCallback extends GameSDKCallback { IDiscordStoreManager getStoreManager(IDiscordCore core); }
- public GetStoreManagerCallback GetStoreManager;
-
- public interface GetVoiceManagerCallback extends GameSDKCallback { IDiscordVoiceManager getVoiceManager(IDiscordCore core); }
- public GetVoiceManagerCallback GetVoiceManager;
-
- public interface GetAchievementManagerCallback extends GameSDKCallback { IDiscordAchievementManager getAchievementManager(IDiscordCore core); }
- public GetAchievementManagerCallback GetAchievementManager;
-
-
-
- public static class ByReference extends IDiscordCore implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}
- }
- public static class ByValue extends IDiscordCore implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}
- }
-
- @Override protected List getFieldOrder() { return Arrays.asList("Destroy", "RunCallbacks", "SetLogHook", "GetApplicationManager", "GetUserManager", "GetImageManager", "GetActivityManager", "GetRelationshipManager", "GetLobbyManager", "GetNetworkManager", "GetOverlayManager", "GetStorageManager", "GetStoreManager", "GetVoiceManager", "GetAchievementManager"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordImageManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordImageManager.java
deleted file mode 100644
index b2bcf8ab..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordImageManager.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordImageDimensions;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordImageHandle;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordImageManager extends DiscordStruct { public IDiscordImageManager() {super();} public IDiscordImageManager(Pointer pointer) {super(pointer);}
- public interface FetchCallback_Callback extends GameSDKCallback {
- void callback(Pointer callbackData, EDiscordResult result, DiscordImageHandle.ByValue handleResult);
- }
- public interface FetchCallback extends GameSDKCallback { void fetch(IDiscordImageManager manager, DiscordImageHandle.ByValue handle, boolean refresh, Pointer callbackData, FetchCallback_Callback callback); }
- public FetchCallback Fetch;
-
- public interface GetDimensionsCallback extends GameSDKCallback { EDiscordResult getDimensions(IDiscordImageManager manager, DiscordImageHandle.ByValue handle, DiscordImageDimensions dimensions); }
- public GetDimensionsCallback GetDimensions;
-
- public interface GetDataCallback extends GameSDKCallback { EDiscordResult getData(IDiscordImageManager manager, DiscordImageHandle.ByValue handle, ByteBuffer data, UInt32 dataLength); }
- public GetDataCallback GetData;
-
-
-
- public static class ByReference extends IDiscordImageManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordImageManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("Fetch", "GetDimensions", "GetData"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java
deleted file mode 100644
index 5cb278c4..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByteByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int64;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt8;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordLobbyEvents extends DiscordStruct { public IDiscordLobbyEvents() {super();} public IDiscordLobbyEvents(Pointer pointer) {super(pointer);}
- public interface OnLobbyUpdateCallback extends GameSDKCallback { void onLobbyUpdate(Pointer eventData, Int64 lobbyId); }
- public OnLobbyUpdateCallback OnLobbyUpdate;
-
- public interface OnLobbyDeleteCallback extends GameSDKCallback { void onLobbyDelete(Pointer eventData, Int64 lobbyId, UInt32 reason); }
- public OnLobbyDeleteCallback OnLobbyDelete;
-
- public interface OnMemberConnectCallback extends GameSDKCallback { void onMemberConnect(Pointer eventData, Int64 lobbyId, Int64 userId); }
- public OnMemberConnectCallback OnMemberConnect;
-
- public interface OnMemberUpdateCallback extends GameSDKCallback { void onMemberUpdate(Pointer eventData, Int64 lobbyId, Int64 userId); }
- public OnMemberUpdateCallback OnMemberUpdate;
-
- public interface OnMemberDisconnectCallback extends GameSDKCallback { void onMemberDisconnect(Pointer eventData, Int64 lobbyId, Int64 userId); }
- public OnMemberDisconnectCallback OnMemberDisconnect;
-
- public interface OnLobbyMessageCallback extends GameSDKCallback { void onLobbyMessage(Pointer eventData, Int64 lobbyId, Int64 userId, ByteByReference data, UInt32 dataLength); }
- public OnLobbyMessageCallback OnLobbyMessage;
-
- public interface OnSpeakingCallback extends GameSDKCallback { void onSpeaking(Pointer eventData, Int64 lobbyId, Int64 userId, boolean speaking); }
- public OnSpeakingCallback OnSpeaking;
-
- public interface OnNetworkMessageCallback extends GameSDKCallback { void onNetworkMessage(Pointer eventData, Int64 lobbyId, Int64 userId, UInt8 channelId, ByteByReference data, UInt32 dataLength); }
- public OnNetworkMessageCallback OnNetworkMessage;
-
-
-
- public static class ByReference extends IDiscordLobbyEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordLobbyEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
-
- @Override protected List getFieldOrder() { return Arrays.asList("OnLobbyUpdate", "OnLobbyDelete", "OnMemberConnect", "OnMemberUpdate", "OnMemberDisconnect", "OnLobbyMessage", "OnSpeaking", "OnNetworkMessage"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java
deleted file mode 100644
index 9e68032f..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByteByReference;
-import com.sun.jna.ptr.IntByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordLobby;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt8;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordLobbyManager extends DiscordStruct { public IDiscordLobbyManager() {super();} public IDiscordLobbyManager(Pointer pointer) {super(pointer);}
- public interface GetLobbyCreateTransactionCallback extends GameSDKCallback { EDiscordResult getLobbyCreateTransaction(IDiscordLobbyManager manager, IDiscordLobbyTransaction transaction); }
- public GetLobbyCreateTransactionCallback GetLobbyCreateTransaction;
-
- public interface GetLobbyUpdateTransactionCallback extends GameSDKCallback { EDiscordResult getLobbyUpdateTransaction(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IDiscordLobbyTransaction transaction); }
- public GetLobbyUpdateTransactionCallback GetLobbyUpdateTransaction;
-
- public interface GetMemberUpdateTransactionCallback extends GameSDKCallback { EDiscordResult getMemberUpdateTransaction(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, IDiscordLobbyMemberTransaction transaction); }
- public GetMemberUpdateTransactionCallback GetMemberUpdateTransaction;
-
- public interface DiscordLobbyManagerCallback extends GameSDKCallback {
- void callback(Pointer callbackData, EDiscordResult result, DiscordLobby lobby);
- }
-
- public interface CreateLobbyCallback extends GameSDKCallback { void createLobby(IDiscordLobbyManager manager, IDiscordLobbyTransaction transaction, Pointer callbackData,DiscordLobbyManagerCallback callback); }
- public CreateLobbyCallback CreateLobby;
-
- public interface UpdateLobbyCallback extends GameSDKCallback { void updateLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IDiscordLobbyTransaction transaction, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public UpdateLobbyCallback UpdateLobby;
-
- public interface DeleteLobbyCallback extends GameSDKCallback { void deleteLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public DeleteLobbyCallback DeleteLobby;
-
- public interface ConnectLobbyCallback extends GameSDKCallback { void connectLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer secret, Pointer callbackData, DiscordLobbyManagerCallback callback); }// secret 128 byte long str
- public ConnectLobbyCallback ConnectLobby;
-
- public interface ConnectLobbyWithActivitySecretCallback extends GameSDKCallback { void connectLobbyWithActivitySecret(IDiscordLobbyManager manager, Pointer activitySecret, Pointer callbackData, DiscordLobbyManagerCallback callback); } // secret 128 byte long str
- public ConnectLobbyWithActivitySecretCallback ConnectLobbyWithActivitySecret;
-
- public interface DisconnectLobbyCallback extends GameSDKCallback { void disconnectLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public DisconnectLobbyCallback DisconnectLobby;
-
- public interface GetLobbyCallback extends GameSDKCallback { EDiscordResult getLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordLobby lobby); }
- public GetLobbyCallback GetLobby;
-
- public interface GetLobbyActivitySecretCallback extends GameSDKCallback { EDiscordResult getLobbyActivitySecret(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer secret); } // pointer to char[128]
- public GetLobbyActivitySecretCallback GetLobbyActivitySecret;
-
- public interface GetLobbyMetadataValueCallback extends GameSDKCallback { EDiscordResult getLobbyMetadataValue(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer key, Pointer value); } // key: char[256] value: pointer to char[4096]
- public GetLobbyMetadataValueCallback GetLobbyMetadataValue;
-
- public interface GetLobbyMetadataKeyCallback extends GameSDKCallback { EDiscordResult getLobbyMetadataKey(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Int32 index, Pointer key); }// key: pointer to char[256]
- public GetLobbyMetadataKeyCallback GetLobbyMetadataKey;
-
- public interface LobbyMetadataCountCallback extends GameSDKCallback { EDiscordResult lobbyMetadataCount(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IntByReference count); }
- public LobbyMetadataCountCallback LobbyMetadataCount;
-
- public interface MemberCountCallback extends GameSDKCallback { EDiscordResult memberCount(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IntByReference count); }
- public MemberCountCallback MemberCount;
-
- public interface GetMemberUserIdCallback extends GameSDKCallback { EDiscordResult getMemberUserId(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Int32 index, Pointer userId); } // userID: pointer to DiscordUserID
- public GetMemberUserIdCallback GetMemberUserId;
-
- public interface GetMemberUserCallback extends GameSDKCallback { EDiscordResult getMemberUser(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, DiscordUser user); }
- public GetMemberUserCallback GetMemberUser;
-
- public interface GetMemberMetadataValueCallback extends GameSDKCallback { EDiscordResult getMemberMetadataValue(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, Pointer key, Pointer value); }// key: char[256] value: pointer to char[4096]
- public GetMemberMetadataValueCallback GetMemberMetadataValue;
-
- public interface GetMemberMetadataKeyCallback extends GameSDKCallback { EDiscordResult getMemberMetadataKey(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, Int32 index, Pointer key); }// key: pointer to char[256]
- public GetMemberMetadataKeyCallback GetMemberMetadataKey;
-
- public interface MemberMetadataCountCallback extends GameSDKCallback { EDiscordResult memberMetadataCount(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, IntByReference count); }
- public MemberMetadataCountCallback MemberMetadataCount;
-
- public interface UpdateMemberCallback extends GameSDKCallback { void updateMember(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, IDiscordLobbyMemberTransaction transaction, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public UpdateMemberCallback UpdateMember;
-
- public interface SendLobbyMessageCallback extends GameSDKCallback { void sendLobbyMessage(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, ByteByReference data, UInt32 dataLength, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public SendLobbyMessageCallback SendLobbyMessage;
-
- public interface GetSearchQueryCallback extends GameSDKCallback { EDiscordResult getSearchQuery(IDiscordLobbyManager manager, IDiscordLobbySearchQuery query); }
- public GetSearchQueryCallback GetSearchQuery;
-
- public interface SearchCallback extends GameSDKCallback { void search(IDiscordLobbyManager manager, IDiscordLobbySearchQuery query, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public SearchCallback Search;
-
- public interface LobbyCountCallback extends GameSDKCallback { void lobbyCount(IDiscordLobbyManager manager, IntByReference count); }
- public LobbyCountCallback LobbyCount;
-
- public interface GetLobbyIdCallback extends GameSDKCallback { EDiscordResult getLobbyId(IDiscordLobbyManager manager, Int32 index, Pointer lobbyId); } // lobbyID: Pointer to DiscordSnowflake
- public GetLobbyIdCallback GetLobbyId;
-
- public interface ConnectVoiceCallback extends GameSDKCallback { void connectVoice(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public ConnectVoiceCallback ConnectVoice;
-
- public interface DisconnectVoiceCallback extends GameSDKCallback { void disconnectVoice(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public DisconnectVoiceCallback DisconnectVoice;
-
- public interface ConnectNetworkCallback extends GameSDKCallback { EDiscordResult connectNetwork(IDiscordLobbyManager manager, DiscordSnowflake lobbyId); }
- public ConnectNetworkCallback ConnectNetwork;
-
- public interface DisconnectNetworkCallback extends GameSDKCallback { EDiscordResult disconnectNetwork(IDiscordLobbyManager manager, DiscordSnowflake lobbyId); }
- public DisconnectNetworkCallback DisconnectNetwork;
-
- public interface FlushNetworkCallback extends GameSDKCallback { EDiscordResult flushNetwork(IDiscordLobbyManager manager); }
- public FlushNetworkCallback FlushNetwork;
-
- public interface OpenNetworkChannelCallback extends GameSDKCallback { EDiscordResult openNetworkChannel(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, UInt8 channelId, boolean reliable); }
- public OpenNetworkChannelCallback OpenNetworkChannel;
-
- public interface SendNetworkMessageCallback extends GameSDKCallback { EDiscordResult sendNetworkMessage(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, UInt8 channelId, ByteByReference data, UInt32 dataLength); }
- public SendNetworkMessageCallback SendNetworkMessage;
-
-
-
- public static class ByReference extends IDiscordLobbyManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordLobbyManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("GetLobbyCreateTransaction", "GetLobbyUpdateTransaction", "GetMemberUpdateTransaction", "CreateLobby", "UpdateLobby", "DeleteLobby", "ConnectLobby", "ConnectLobbyWithActivitySecret", "DisconnectLobby", "GetLobby", "GetLobbyActivitySecret", "GetLobbyMetadataValue", "GetLobbyMetadataKey", "LobbyMetadataCount", "MemberCount", "GetMemberUserId", "GetMemberUser", "GetMemberMetadataValue", "GetMemberMetadataKey", "MemberMetadataCount", "UpdateMember", "SendLobbyMessage", "GetSearchQuery", "Search", "LobbyCount", "GetLobbyId", "ConnectVoice", "DisconnectVoice", "ConnectNetwork", "DisconnectNetwork", "FlushNetwork", "OpenNetworkChannel", "SendNetworkMessage"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java
deleted file mode 100644
index 43834182..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordLobbyMemberTransaction extends DiscordStruct { public IDiscordLobbyMemberTransaction() {super();} public IDiscordLobbyMemberTransaction(Pointer pointer) {super(pointer);}
- public interface SetMetadataCallback extends GameSDKCallback { EDiscordResult setMetadata(IDiscordLobbyMemberTransaction lobbyMemberTransaction, Pointer key, Pointer value); } // key is 256 bytes, value is 4096
- public SetMetadataCallback SetMetadata;
-
- public interface DeleteMetadataCallback extends GameSDKCallback { EDiscordResult deleteMetadata(IDiscordLobbyMemberTransaction lobbyMemberTransaction, Pointer key); } // key is 256 bytes, passed by reference
- public DeleteMetadataCallback DeleteMetadata;
-
-
-
- public static class ByReference extends IDiscordLobbyMemberTransaction implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordLobbyMemberTransaction implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("SetMetadata", "DeleteMetadata"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java
deleted file mode 100644
index 402f1e1b..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbySearchCast;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbySearchComparison;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbySearchDistance;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordLobbySearchQuery extends DiscordStruct { public IDiscordLobbySearchQuery() {super();} public IDiscordLobbySearchQuery(Pointer pointer) {super(pointer);}
- public interface FilterCallback extends GameSDKCallback { EDiscordResult filter(IDiscordLobbySearchQuery lobbySearchQuery, Pointer key, EDiscordLobbySearchComparison comparison, EDiscordLobbySearchCast cast, Pointer value); }
- public FilterCallback Filter;
-
- public interface SortCallback extends GameSDKCallback { EDiscordResult sort(IDiscordLobbySearchQuery lobbySearchQuery, Pointer key, EDiscordLobbySearchCast cast, Pointer value); }
- public SortCallback Sort;
-
- public interface LimitCallback extends GameSDKCallback { EDiscordResult limit(IDiscordLobbySearchQuery lobbySearchQuery, UInt32 limit); }
- public LimitCallback Limit;
-
- public interface DistanceCallback extends GameSDKCallback { EDiscordResult distance(IDiscordLobbySearchQuery lobbySearchQuery, EDiscordLobbySearchDistance distance); }
- public DistanceCallback Distance;
-
-
-
- public static class ByReference extends IDiscordLobbySearchQuery implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordLobbySearchQuery implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("Filter", "Sort", "Limit", "Distance"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java
deleted file mode 100644
index ef0178e8..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbyType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordLobbyTransaction extends DiscordStruct { public IDiscordLobbyTransaction() {super();} public IDiscordLobbyTransaction(Pointer pointer) {super(pointer);}
- public interface SetTypeCallback extends GameSDKCallback { EDiscordResult setType(IDiscordLobbyTransaction lobbyTransaction, EDiscordLobbyType type); }
- public SetTypeCallback SetType;
-
- public interface SetOwnerCallback extends GameSDKCallback { EDiscordResult setOwner(IDiscordLobbyTransaction lobbyTransaction, DiscordSnowflake ownerId); }
- public SetOwnerCallback SetOwner;
-
- public interface SetCapacityCallback extends GameSDKCallback { EDiscordResult setCapacity(IDiscordLobbyTransaction lobbyTransaction, UInt32 capacity); }
- public SetCapacityCallback SetCapacity;
-
- public interface SetMetadataCallback extends GameSDKCallback { EDiscordResult setMetadata(IDiscordLobbyTransaction lobbyTransaction, Pointer key, Pointer value); }
- public SetMetadataCallback SetMetadata;
-
- public interface DeleteMetadataCallback extends GameSDKCallback { EDiscordResult deleteMetadata(IDiscordLobbyTransaction lobbyTransaction, Pointer key); }
- public DeleteMetadataCallback DeleteMetadata;
-
- public interface SetLockedCallback extends GameSDKCallback { EDiscordResult setLocked(IDiscordLobbyTransaction lobbyTransaction, boolean locked); }
- public SetLockedCallback SetLocked;
-
-
-
- public static class ByReference extends IDiscordLobbyTransaction implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordLobbyTransaction implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("SetType", "SetOwner", "SetCapacity", "SetMetadata", "DeleteMetadata", "SetLocked"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java
deleted file mode 100644
index 75d2266c..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByteByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordNetworkChannelId;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordNetworkPeerId;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordNetworkEvents extends DiscordStruct { public IDiscordNetworkEvents() {super();} public IDiscordNetworkEvents(Pointer pointer) {super(pointer);}
- public interface OnMessageCallback extends GameSDKCallback { void onMessage(Pointer eventData, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId, ByteByReference data, UInt32 dataLength); }
- public OnMessageCallback OnMessage;
-
- public interface OnRouteUpdateCallback extends GameSDKCallback { void onRouteUpdate(Pointer eventData, String route_data); }
- public OnRouteUpdateCallback OnRouteUpdate;
-
-
-
- public static class ByReference extends IDiscordNetworkEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordNetworkEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("OnMessage", "OnRouteUpdate"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java
deleted file mode 100644
index 7ec25896..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByteByReference;
-import com.sun.jna.ptr.LongByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordNetworkChannelId;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordNetworkPeerId;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordNetworkManager extends DiscordStruct { public IDiscordNetworkManager() {super();} public IDiscordNetworkManager(Pointer pointer) {super(pointer);}
- public interface GetPeerIdCallback extends GameSDKCallback { void getPeerId(IDiscordNetworkManager manager, LongByReference peerId); }
- public GetPeerIdCallback GetPeerId;
-
- public interface FlushCallback extends GameSDKCallback { EDiscordResult flush(IDiscordNetworkManager manager); }
- public FlushCallback Flush;
-
- public interface OpenPeerCallback extends GameSDKCallback { EDiscordResult openPeer(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, String routeData); }
- public OpenPeerCallback OpenPeer;
-
- public interface UpdatePeerCallback extends GameSDKCallback { EDiscordResult updatePeer(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, String routeData); }
- public UpdatePeerCallback UpdatePeer;
-
- public interface ClosePeerCallback extends GameSDKCallback { EDiscordResult closePeer(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId); }
- public ClosePeerCallback ClosePeer;
-
- public interface OpenChannelCallback extends GameSDKCallback { EDiscordResult openChannel(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId, boolean reliable); }
- public OpenChannelCallback OpenChannel;
-
- public interface CloseChannelCallback extends GameSDKCallback { EDiscordResult closeChannel(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId); }
- public CloseChannelCallback CloseChannel;
-
- public interface SendMessageCallback extends GameSDKCallback { EDiscordResult sendMessage(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId, ByteByReference data, UInt32 dataLength); }
- public SendMessageCallback SendMessage;
-
-
-
- public static class ByReference extends IDiscordNetworkManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordNetworkManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("GetPeerId", "Flush", "OpenPeer", "UpdatePeer", "ClosePeer", "OpenChannel", "CloseChannel", "SendMessage"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java
deleted file mode 100644
index 1e48b0f0..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordOverlayEvents extends DiscordStruct { public IDiscordOverlayEvents() {super();} public IDiscordOverlayEvents(Pointer pointer) {super(pointer);}
- public interface OnToggleCallback extends GameSDKCallback { void onToggle(Pointer eventData, boolean locked); }
- public OnToggleCallback OnToggle;
-
-
-
- public static class ByReference extends IDiscordOverlayEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordOverlayEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("OnToggle"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java
deleted file mode 100644
index d29dd2cf..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByteByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityActionType;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordOverlayManager extends DiscordStruct { public IDiscordOverlayManager() {super();} public IDiscordOverlayManager(Pointer pointer) {super(pointer);}
- public interface IsEnabledCallback extends GameSDKCallback { void isEnabled(IDiscordOverlayManager manager, ByteByReference enabled); }
- public IsEnabledCallback IsEnabled;
-
- public interface IsLockedCallback extends GameSDKCallback { void isLocked(IDiscordOverlayManager manager, ByteByReference locked); }
- public IsLockedCallback IsLocked;
-
- public interface SetLockedCallback extends GameSDKCallback { void setLocked(IDiscordOverlayManager manager, boolean locked, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public SetLockedCallback SetLocked;
-
- public interface OpenActivityInviteCallback extends GameSDKCallback { void openActivityInvite(IDiscordOverlayManager manager, EDiscordActivityActionType type, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public OpenActivityInviteCallback OpenActivityInvite;
-
- public interface OpenGuildInviteCallback extends GameSDKCallback { void openGuildInvite(IDiscordOverlayManager manager, String code, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public OpenGuildInviteCallback OpenGuildInvite;
-
- public interface OpenVoiceSettingsCallback extends GameSDKCallback { void openVoiceSettings(IDiscordOverlayManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public OpenVoiceSettingsCallback OpenVoiceSettings;
-
-
-
- public static class ByReference extends IDiscordOverlayManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordOverlayManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("IsEnabled", "IsLocked", "SetLocked", "OpenActivityInvite", "OpenGuildInvite", "OpenVoiceSettings"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java
deleted file mode 100644
index 8210df46..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordRelationship;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordRelationshipEvents extends DiscordStruct { public IDiscordRelationshipEvents() {super();} public IDiscordRelationshipEvents(Pointer pointer) {super(pointer);}
- public interface OnRefreshCallback extends GameSDKCallback { void onRefresh(Pointer eventData); }
- public OnRefreshCallback OnRefresh;
-
- public interface OnRelationshipUpdateCallback extends GameSDKCallback { void onRelationshipUpdate(Pointer eventData, DiscordRelationship relationship); }
- public OnRelationshipUpdateCallback OnRelationshipUpdate;
-
-
-
- public static class ByReference extends IDiscordRelationshipEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordRelationshipEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("OnRefresh", "OnRelationshipUpdate"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java
deleted file mode 100644
index abd59cf0..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.IntByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordRelationship;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordRelationshipManager extends DiscordStruct { public IDiscordRelationshipManager() {super();} public IDiscordRelationshipManager(Pointer pointer) {super(pointer);}
- public interface FilterCallback extends GameSDKCallback { void filter(IDiscordRelationshipManager manager, Pointer filterData, FilterCallback_Callback filter); }
- public interface FilterCallback_Callback extends GameSDKCallback { boolean filter(Pointer filterData, DiscordRelationship relationShip);}
- public FilterCallback Filter;
-
- public interface CountCallback extends GameSDKCallback { EDiscordResult count(IDiscordRelationshipManager manager, IntByReference count); }
- public CountCallback Count;
-
- public interface GetCallback extends GameSDKCallback { EDiscordResult get(IDiscordRelationshipManager manager, DiscordSnowflake userId, DiscordRelationship relationship); }
- public GetCallback Get;
-
- public interface GetAtCallback extends GameSDKCallback { EDiscordResult getAt(IDiscordRelationshipManager manager, UInt32 index, DiscordRelationship relationship); }
- public GetAtCallback GetAt;
-
-
-
- public static class ByReference extends IDiscordRelationshipManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordRelationshipManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("Filter", "Count", "Get", "GetAt"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStorageManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStorageManager.java
deleted file mode 100644
index 21794bfd..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStorageManager.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByteByReference;
-import com.sun.jna.ptr.IntByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordFileStat;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt64;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordStorageManager extends DiscordStruct { public IDiscordStorageManager() {super();} public IDiscordStorageManager(Pointer pointer) {super(pointer);}
- public interface ReadCallback extends GameSDKCallback { EDiscordResult read(IDiscordStorageManager manager, String name, ByteByReference data, UInt32 dataLength, IntByReference read); }
- public ReadCallback Read;
-
- public interface DiscordStorageManagerCallback extends GameSDKCallback {
- void callback(Pointer callbackData, EDiscordResult result, ByteByReference data, IntByReference data_length);
- }
-
- public interface ReadAsyncCallback extends GameSDKCallback { void readAsync(IDiscordStorageManager manager, String name, Pointer callbackData, DiscordStorageManagerCallback callback); }
- public ReadAsyncCallback ReadAsync;
-
- public interface ReadAsyncPartialCallback extends GameSDKCallback { void readAsyncPartial(IDiscordStorageManager manager, String name, UInt64 offset, UInt64 length, Pointer callbackData, DiscordStorageManagerCallback callback); }
- public ReadAsyncPartialCallback ReadAsyncPartial;
-
- public interface WriteCallback extends GameSDKCallback { EDiscordResult write(IDiscordStorageManager manager, String name, ByteByReference data, UInt32 dataLength); }
- public WriteCallback Write;
-
- public interface WriteAsyncCallback extends GameSDKCallback { void writeAsync(IDiscordStorageManager manager, String name, ByteByReference data, UInt32 dataLength, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public WriteAsyncCallback WriteAsync;
-
- public interface DeleteCallback extends GameSDKCallback { EDiscordResult delete(IDiscordStorageManager manager, String name); }
- public DeleteCallback Delete;
-
- public interface ExistsCallback extends GameSDKCallback { EDiscordResult exists(IDiscordStorageManager manager, String name, ByteByReference exists); } // exists actually boolean
- public ExistsCallback Exists;
-
- public interface CountCallback extends GameSDKCallback { void count(IDiscordStorageManager manager, IntByReference count); }
- public CountCallback Count;
-
- public interface StatCallback extends GameSDKCallback { EDiscordResult stat(IDiscordStorageManager manager, String name, DiscordFileStat stat); }
- public StatCallback Stat;
-
- public interface StatAtCallback extends GameSDKCallback { EDiscordResult statAt(IDiscordStorageManager manager, Int32 index, DiscordFileStat stat); }
- public StatAtCallback StatAt;
-
- public interface GetPathCallback extends GameSDKCallback { EDiscordResult getPath(IDiscordStorageManager manager, Pointer path); } // path str len 4096
- public GetPathCallback GetPath;
-
-
-
- public static class ByReference extends IDiscordStorageManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordStorageManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
-
- @Override protected List getFieldOrder() { return Arrays.asList("Read", "ReadAsync", "ReadAsyncPartial", "Write", "WriteAsync", "Delete", "Exists", "Count", "Stat", "StatAt", "GetPath"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java
deleted file mode 100644
index 89a4c83b..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordEntitlement;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordStoreEvents extends DiscordStruct { public IDiscordStoreEvents() {super();} public IDiscordStoreEvents(Pointer pointer) {super(pointer);}
- public interface OnEntitlementCreateCallback extends GameSDKCallback { void onEntitlementCreate(Pointer eventData, DiscordEntitlement entitlement); }
- public OnEntitlementCreateCallback OnEntitlementCreate;
-
- public interface OnEntitlementDeleteCallback extends GameSDKCallback { void onEntitlementDelete(Pointer eventData, DiscordEntitlement entitlement); }
- public OnEntitlementDeleteCallback OnEntitlementDelete;
-
-
-
- public static class ByReference extends IDiscordStoreEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordStoreEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
-
- @Override protected List getFieldOrder() { return Arrays.asList("OnEntitlementCreate", "OnEntitlementDelete"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreManager.java
deleted file mode 100644
index 6e95d3a3..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreManager.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByteByReference;
-import com.sun.jna.ptr.IntByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordEntitlement;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordSku;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordStoreManager extends DiscordStruct { public IDiscordStoreManager() {super();} public IDiscordStoreManager(Pointer pointer) {super(pointer);}
- public interface FetchSkusCallback extends GameSDKCallback { void fetchSkus(IDiscordStoreManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public FetchSkusCallback FetchSkus;
-
- public interface CountSkusCallback extends GameSDKCallback { void countSkus(IDiscordStoreManager manager, IntByReference count); }
- public CountSkusCallback CountSkus;
-
- public interface GetSkuCallback extends GameSDKCallback { EDiscordResult getSku(IDiscordStoreManager manager, DiscordSnowflake skuId, DiscordSku sku); }
- public GetSkuCallback GetSku;
-
- public interface GetSkuAtCallback extends GameSDKCallback { EDiscordResult getSkuAt(IDiscordStoreManager manager, Int32 index, DiscordSku sku); }
- public GetSkuAtCallback GetSkuAt;
-
- public interface FetchEntitlementsCallback extends GameSDKCallback { void fetchEntitlements(IDiscordStoreManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public FetchEntitlementsCallback FetchEntitlements;
-
- public interface CountEntitlementsCallback extends GameSDKCallback { void countEntitlements(IDiscordStoreManager manager, IntByReference count); }
- public CountEntitlementsCallback CountEntitlements;
-
- public interface GetEntitlementCallback extends GameSDKCallback { EDiscordResult getEntitlement(IDiscordStoreManager manager, DiscordSnowflake entitlementId, DiscordEntitlement entitlement); }
- public GetEntitlementCallback GetEntitlement;
-
- public interface GetEntitlementAtCallback extends GameSDKCallback { EDiscordResult getEntitlementAt(IDiscordStoreManager manager, Int32 index, DiscordEntitlement entitlement); }
- public GetEntitlementAtCallback GetEntitlementAt;
-
- public interface HasSkuEntitlementCallback extends GameSDKCallback { EDiscordResult hasSkuEntitlement(IDiscordStoreManager manager, DiscordSnowflake skuId, ByteByReference hasEntitlement); } // hasEntitlement bool ptr
- public HasSkuEntitlementCallback HasSkuEntitlement;
-
- public interface StartPurchaseCallback extends GameSDKCallback { void startPurchase(IDiscordStoreManager manager, DiscordSnowflake skuId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public StartPurchaseCallback StartPurchase;
-
-
-
- public static class ByReference extends IDiscordStoreManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordStoreManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("FetchSkus", "CountSkus", "GetSku", "GetSkuAt", "FetchEntitlements", "CountEntitlements", "GetEntitlement", "GetEntitlementAt", "HasSkuEntitlement", "StartPurchase"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserEvents.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserEvents.java
deleted file mode 100644
index e65ecbd0..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserEvents.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordUserEvents extends DiscordStruct { public IDiscordUserEvents() {super();} public IDiscordUserEvents(Pointer pointer) {super(pointer);}
- public interface OnCurrentUserUpdateCallback extends GameSDKCallback { void onCurrentUserUpdate(Pointer eventData); }
- public OnCurrentUserUpdateCallback OnCurrentUserUpdate;
-
-
-
- public static class ByReference extends IDiscordUserEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordUserEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
- @Override protected List getFieldOrder() { return Arrays.asList("OnCurrentUserUpdate"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserManager.java
deleted file mode 100644
index 9a9375f9..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserManager.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByteByReference;
-import com.sun.jna.ptr.IntByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordUserFlag;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordUserManager extends DiscordStruct { public IDiscordUserManager() {super();} public IDiscordUserManager(Pointer pointer) {super(pointer);}
- public interface GetCurrentUserCallback extends GameSDKCallback { EDiscordResult getCurrentUser(IDiscordUserManager manager, DiscordUser currentUser); }
- public GetCurrentUserCallback GetCurrentUser;
-
- public interface GetUserCallback extends GameSDKCallback { void getUser(IDiscordUserManager manager, DiscordSnowflake userId, Pointer callbackData, GetUserCallback_Callback callback); }
- public interface GetUserCallback_Callback extends GameSDKCallback { void callback(Pointer callbackData, EDiscordResult result, DiscordUser user);}
- public GetUserCallback GetUser;
-
- public interface GetCurrentUserPremiumTypeCallback extends GameSDKCallback { EDiscordResult getCurrentUserPremiumType(IDiscordUserManager manager, IntByReference premiumType); } // EDiscordPremiumType ptr
- public GetCurrentUserPremiumTypeCallback GetCurrentUserPremiumType;
-
- public interface CurrentUserHasFlagCallback extends GameSDKCallback { EDiscordResult currentUserHasFlag(IDiscordUserManager manager, EDiscordUserFlag flag, ByteByReference hasFlag); } // hasFlag bool ptr
- public CurrentUserHasFlagCallback CurrentUserHasFlag;
-
-
-
- public static class ByReference extends IDiscordUserManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordUserManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
- @Override protected List getFieldOrder() { return Arrays.asList("GetCurrentUser", "GetUser", "GetCurrentUserPremiumType", "CurrentUserHasFlag"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java
deleted file mode 100644
index ebb3a4ab..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordVoiceEvents extends DiscordStruct { public IDiscordVoiceEvents() {super();} public IDiscordVoiceEvents(Pointer pointer) {super(pointer);}
- public interface OnSettingsUpdateCallback extends GameSDKCallback { void onSettingsUpdate(Pointer eventData); }
- public OnSettingsUpdateCallback OnSettingsUpdate;
-
-
-
- public static class ByReference extends IDiscordVoiceEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordVoiceEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
-
- @Override protected List getFieldOrder() { return Arrays.asList("OnSettingsUpdate"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java
deleted file mode 100644
index 6aacffa1..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.Structure;
-import com.sun.jna.ptr.ByteByReference;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordInputMode;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt8;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class IDiscordVoiceManager extends DiscordStruct { public IDiscordVoiceManager() {super();} public IDiscordVoiceManager(Pointer pointer) {super(pointer);}
- public interface GetInputModeCallback extends GameSDKCallback { EDiscordResult getInputMode(IDiscordVoiceManager manager, DiscordInputMode inputMode); }
- public GetInputModeCallback GetInputMode;
-
- public interface SetInputModeCallback extends GameSDKCallback { void setInputMode(IDiscordVoiceManager manager, DiscordInputMode.ByValue inputMode, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
- public SetInputModeCallback SetInputMode;
-
- public interface IsSelfMuteCallback extends GameSDKCallback { EDiscordResult isSelfMute(IDiscordVoiceManager manager, ByteByReference mute); }
- public IsSelfMuteCallback IsSelfMute;
-
- public interface SetSelfMuteCallback extends GameSDKCallback { EDiscordResult setSelfMute(IDiscordVoiceManager manager, boolean mute); }
- public SetSelfMuteCallback SetSelfMute;
-
- public interface IsSelfDeafCallback extends GameSDKCallback { EDiscordResult isSelfDeaf(IDiscordVoiceManager manager, ByteByReference deaf); }
- public IsSelfDeafCallback IsSelfDeaf;
-
- public interface SetSelfDeafCallback extends GameSDKCallback { EDiscordResult setSelfDeaf(IDiscordVoiceManager manager, boolean deaf); }
- public SetSelfDeafCallback SetSelfDeaf;
-
- public interface IsLocalMuteCallback extends GameSDKCallback { EDiscordResult isLocalMute(IDiscordVoiceManager manager, DiscordSnowflake userId, ByteByReference mute); }
- public IsLocalMuteCallback IsLocalMute;
-
- public interface SetLocalMuteCallback extends GameSDKCallback { EDiscordResult setLocalMute(IDiscordVoiceManager manager, DiscordSnowflake userId, boolean mute); }
- public SetLocalMuteCallback SetLocalMute;
-
- public interface GetLocalVolumeCallback extends GameSDKCallback { EDiscordResult getLocalVolume(IDiscordVoiceManager manager, DiscordSnowflake userId, ByteByReference volume); }
- public GetLocalVolumeCallback GetLocalVolume;
-
- public interface SetLocalVolumeCallback extends GameSDKCallback { EDiscordResult setLocalVolume(IDiscordVoiceManager manager, DiscordSnowflake userId, UInt8 volume); }
- public SetLocalVolumeCallback SetLocalVolume;
-
-
-
- public static class ByReference extends IDiscordVoiceManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
- public static class ByValue extends IDiscordVoiceManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
-
-
- @Override protected List getFieldOrder() { return Arrays.asList("GetInputMode", "SetInputMode", "IsSelfMute", "SetSelfMute", "IsSelfDeaf", "SetSelfDeaf", "IsLocalMute", "SetLocalMute", "GetLocalVolume", "SetLocalVolume"); }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordClientID.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordClientID.java
deleted file mode 100644
index 74f3a6c2..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordClientID.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
-
-
-public class DiscordClientID extends Int64 {
- public DiscordClientID() {
- this(0);
- }
- public DiscordClientID(long value) {
- super(value);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordSnowflake.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordSnowflake.java
deleted file mode 100644
index 11f26340..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordSnowflake.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
-
-
-public class DiscordSnowflake extends Int64 {
- public DiscordSnowflake() {
- this(0);
- }
- public DiscordSnowflake(long value) {
- super(value);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordTimestamp.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordTimestamp.java
deleted file mode 100644
index 69600825..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordTimestamp.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
-
-
-public class DiscordTimestamp extends Int64 {
- public DiscordTimestamp() {
- this(0);
- }
- public DiscordTimestamp(long value) {
- super(value);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordVersion.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordVersion.java
deleted file mode 100644
index 58625b55..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordVersion.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
-
-
-public class DiscordVersion extends Int32 {
- public DiscordVersion() {
- this(0);
- }
- public DiscordVersion(long value) {
- super(value);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int32.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int32.java
deleted file mode 100644
index 84210e6b..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int32.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
-
-import com.sun.jna.IntegerType;
-
-public class Int32 extends IntegerType {
- public static final int SIZE = 4;
- public Int32() {
- this(0);
- }
- public Int32(long value) {
- super(SIZE, value, false);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int64.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int64.java
deleted file mode 100644
index 7ee7e61a..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int64.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
-
-import com.sun.jna.IntegerType;
-
-public class Int64 extends IntegerType {
- public static final int SIZE = 8;
- public Int64() {
- this(0);
- }
- public Int64(long value) {
- super(SIZE, value, false);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt32.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt32.java
deleted file mode 100644
index ff7db8a8..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt32.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
-
-import com.sun.jna.IntegerType;
-
-public class UInt32 extends IntegerType {
- public static final int SIZE = 4;
- public UInt32() {
- this(0);
- }
- public UInt32(long value) {
- super(SIZE, value, true);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt64.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt64.java
deleted file mode 100644
index 360a80ee..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt64.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
-
-import com.sun.jna.IntegerType;
-
-public class UInt64 extends IntegerType {
- public static final int SIZE = 8;
- public UInt64() {
- this(0);
- }
- public UInt64(long value) {
- super(SIZE, value, true);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt8.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt8.java
deleted file mode 100644
index f48ebd06..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt8.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
-
-import com.sun.jna.IntegerType;
-
-public class UInt8 extends IntegerType {
- public static final int SIZE = 1;
- public UInt8() {
- this(0);
- }
- public UInt8(long value) {
- super(SIZE, value, true);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordActivity.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordActivity.java
deleted file mode 100644
index 76b11178..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordActivity.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.rpc;
-
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.GameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordActivity;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityType;
-import lombok.Data;
-
-@Data
-public class JDiscordActivity {
- private EDiscordActivityType activityType;
- private long applicationId;
- private String name, state, details;
- private long start, end;
- private String largeImage, largeText, smallImage, smallText;
- private String partyId;
- private int partyCurr, partyMax;
- private String matchSecret, joinSecret, spectateSecret;
- private boolean instance;
-
- public static JDiscordActivity fromJNA(DiscordActivity discordActivity) {
- if (discordActivity == null) return null;
- JDiscordActivity jDiscordActivity = new JDiscordActivity();
- jDiscordActivity.activityType = discordActivity.activityType;
- jDiscordActivity.applicationId = discordActivity.applicationId.longValue();
- jDiscordActivity.name = GameSDK.readString(discordActivity.name);
- jDiscordActivity.state = GameSDK.readString(discordActivity.state);
- jDiscordActivity.details = GameSDK.readString(discordActivity.details);
- if (discordActivity.assets != null) {
- jDiscordActivity.largeImage = GameSDK.readString(discordActivity.assets.large_image);
- jDiscordActivity.largeText = GameSDK.readString(discordActivity.assets.large_text);
- jDiscordActivity.smallImage = GameSDK.readString(discordActivity.assets.small_image);
- jDiscordActivity.smallText = GameSDK.readString(discordActivity.assets.small_text);
- }
- if (discordActivity.timestamps != null) {
- jDiscordActivity.start = discordActivity.timestamps.start.longValue();
- jDiscordActivity.end = discordActivity.timestamps.end.longValue();
- }
- if (discordActivity.secrets != null) {
- jDiscordActivity.matchSecret= GameSDK.readString(discordActivity.secrets.match);
- jDiscordActivity.joinSecret = GameSDK.readString(discordActivity.secrets.join);
- jDiscordActivity.spectateSecret = GameSDK.readString(discordActivity.secrets.spectate);
- }
- if (discordActivity.party != null) {
- jDiscordActivity.partyId = GameSDK.readString(discordActivity.party.id);
- if (discordActivity.party.discordActivityParty != null) {
- jDiscordActivity.partyCurr = discordActivity.party.discordActivityParty.current_size.intValue();
- jDiscordActivity.partyMax = discordActivity.party.discordActivityParty.max_size.intValue();
- }
- }
- jDiscordActivity.instance = discordActivity.instance;
-
- return jDiscordActivity;
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordRelation.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordRelation.java
deleted file mode 100644
index ae7ed1a6..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordRelation.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.rpc;
-
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordRelationship;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordRelationshipType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordStatus;
-import lombok.Data;
-
-@Data
-public class JDiscordRelation {
- private EDiscordRelationshipType discordRelationshipType;
- private EDiscordStatus status;
- private JDiscordActivity discordActivity;
- private JDiscordUser discordUser;
-
- public static JDiscordRelation fromJNA(DiscordRelationship relationship) {
- JDiscordRelation jDiscordRelation = new JDiscordRelation();
- jDiscordRelation.discordUser = JDiscordUser.fromJNA(relationship.user);
- jDiscordRelation.discordActivity = JDiscordActivity.fromJNA(relationship.presence.activity);
- jDiscordRelation.status = relationship.presence.status;
- jDiscordRelation.discordRelationshipType = relationship.type;
- return jDiscordRelation;
- }
-
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordUser.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordUser.java
deleted file mode 100644
index a56cd884..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordUser.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.rpc;
-
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.GameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
-import lombok.Data;
-
-@Data
-public class JDiscordUser {
- private long id;
- private String username, discriminator, avatar;
- private boolean bot;
-
- public static JDiscordUser fromJNA(DiscordUser discordUser) {
- JDiscordUser jDiscordUser = new JDiscordUser();
- jDiscordUser.id = discordUser.id.longValue();
- jDiscordUser.username = GameSDK.readString(discordUser.username);
- jDiscordUser.discriminator = GameSDK.readString(discordUser.discriminator);
- jDiscordUser.avatar = GameSDK.readString(discordUser.avatar);
- jDiscordUser.bot = discordUser.bot;
- return jDiscordUser;
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/RichPresenceManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/RichPresenceManager.java
deleted file mode 100644
index ff1d0ef2..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/RichPresenceManager.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod.discord.rpc;
-
-import com.sun.jna.Pointer;
-import com.sun.jna.ptr.IntByReference;
-import com.sun.jna.ptr.PointerByReference;
-import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
-import kr.syeyoung.dungeonsguide.mod.SkyblockStatus;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.GameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.*;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityJoinRequestReply;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordCreateFlags;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLogLevel;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct.*;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.*;
-import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonContext;
-import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserJoinRequestEvent;
-import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserUpdateEvent;
-import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
-import kr.syeyoung.dungeonsguide.mod.party.PartyContext;
-import kr.syeyoung.dungeonsguide.mod.party.PartyManager;
-import lombok.Getter;
-import net.minecraftforge.common.MinecraftForge;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
-
-public class RichPresenceManager implements Runnable {
- public static RichPresenceManager INSTANCE = new RichPresenceManager();
- private Thread t = new Thread(DungeonsGuide.THREAD_GROUP, this);
-
- public RichPresenceManager() {
- t.start();
- }
- @Getter
- private NativeGameSDK nativeGameSDK;
- @Getter
- private IDiscordCore iDiscordCore;
- private IDiscordActivityManager activityManager;
- private IDiscordRelationshipManager relationshipManager;
- private IDiscordActivityEvents.ByReference callbacks;
- private IDiscordRelationshipEvents.ByReference relation_callbacks;
-
- @Getter
- private Map<Long, JDiscordRelation> relationMap = new HashMap<>();
-
- private boolean ready = false;
-
- @Getter
- private int lastSetupCode = -99999;
- public int setup() {
- ready = false;
- if (iDiscordCore != null) {
- iDiscordCore.Destroy.destroy(iDiscordCore);
- iDiscordCore = null;
- activityManager = null; callbacks = null; relation_callbacks = null; relationMap.clear();
- }
-
- nativeGameSDK = GameSDK.getNativeGameSDK();
- if (nativeGameSDK == null) return -9999;
- DiscordCreateParams discordCreateParams = new DiscordCreateParams();
- discordCreateParams.flags = new UInt64(EDiscordCreateFlags.DiscordCreateFlags_NoRequireDiscord.getValue());
- discordCreateParams.client_id = new DiscordClientID(816298079732498473L);
-
- callbacks = new IDiscordActivityEvents.ByReference();
- callbacks.OnActivityInvite = (eventData, type, user, activity) -> {
- try {
- MinecraftForge.EVENT_BUS.post(new DiscordUserJoinRequestEvent(user, true));
- } catch (Throwable t) {
- t.printStackTrace();
- }
- System.out.println("Received Join Request from "+user.id.longValue()+" ("+GameSDK.readString(user.username)+")");
- };
- callbacks.OnActivityJoin = (eventData, secret) -> {
- PartyManager.INSTANCE.joinWithToken(secret);
- System.out.println("Trying to join with token "+secret);
- };
- callbacks.OnActivityJoinRequest = (eventData, user) -> {
- try {
- MinecraftForge.EVENT_BUS.post(new DiscordUserJoinRequestEvent(user, false));
- } catch (Throwable t) {
- t.printStackTrace();
- }
- System.out.println("Received Join Request from "+user.id.longValue()+" - "+GameSDK.readString(user.username));
- };
- callbacks.OnActivitySpectate = (eventData, secret) -> {
- };
- callbacks.write();
-
- relation_callbacks = new IDiscordRelationshipEvents.ByReference();
- relation_callbacks.OnRefresh = (p) -> {
- try {
- ready = true;
- IDiscordRelationshipManager iDiscordRelationshipManager = iDiscordCore.GetRelationshipManager.getRelationshipManager(iDiscordCore);
- iDiscordRelationshipManager.Filter.filter(iDiscordRelationshipManager, Pointer.NULL, (d, relation) -> true);
- IntByReference intByReference = new IntByReference();
- iDiscordRelationshipManager.Count.count(iDiscordRelationshipManager, intByReference);
- int count = intByReference.getValue();
- relationMap.clear();
- for (int i = 0; i < count; i++) {
- DiscordRelationship discordRelationship = new DiscordRelationship();
- iDiscordRelationshipManager.GetAt.getAt(iDiscordRelationshipManager, new UInt32(i), discordRelationship);
-
- JDiscordRelation jDiscordRelation = JDiscordRelation.fromJNA(discordRelationship);
- relationMap.put(jDiscordRelation.getDiscordUser().getId(), jDiscordRelation);
- }
- } catch (Throwable e) {e.printStackTrace();}
- };
- relation_callbacks.OnRelationshipUpdate = (p, rel) -> {
- try {
- JDiscordRelation jDiscordRelation = JDiscordRelation.fromJNA(rel);
- JDiscordRelation prev = relationMap.put(jDiscordRelation.getDiscordUser().getId(), jDiscordRelation);
- MinecraftForge.EVENT_BUS.post(new DiscordUserUpdateEvent(prev, jDiscordRelation));
- } catch (Throwable t) {
- t.printStackTrace();
- }
- };
- relation_callbacks.write();
-
- discordCreateParams.activity_events = callbacks;
- discordCreateParams.relationship_events = relation_callbacks; // 96
-
- PointerByReference pointerByReference = new PointerByReference();
- discordCreateParams.write();
-
- EDiscordResult eDiscordResult = nativeGameSDK.DiscordCreate(new DiscordVersion(NativeGameSDK.DISCORD_VERSION), discordCreateParams, pointerByReference);
- if (eDiscordResult != EDiscordResult.DiscordResult_Ok) return eDiscordResult.getValue();
- if (pointerByReference.getValue() == Pointer.NULL) return -9998;
- iDiscordCore = new IDiscordCore(pointerByReference.getValue());
-
- iDiscordCore.SetLogHook.setLogHook(iDiscordCore, EDiscordLogLevel.DiscordLogLevel_Debug, Pointer.NULL, (hookData, level, message) -> System.out.println(message+" - "+level+" - "+hookData));
-
- activityManager = iDiscordCore.GetActivityManager.getActivityManager(iDiscordCore);
- relationshipManager = iDiscordCore.GetRelationshipManager.getRelationshipManager(iDiscordCore);
-
- return eDiscordResult.getValue();
- }
-
- private final SkyblockStatus skyblockStatus = DungeonsGuide.getDungeonsGuide().getSkyblockStatus();
-
- public void respond(DiscordSnowflake userID, EDiscordActivityJoinRequestReply reply) {
- if (activityManager == null) return;
- activityManager.SendRequestReply.sendRequestReply(activityManager, userID, reply, Pointer.NULL, (callbackData, result) -> {
- System.out.println("Discord Returned "+result+" For Replying "+reply+" To "+userID.longValue()+"L");
- });
- }
-
- public void accept(DiscordSnowflake userID) {
- if (activityManager == null) return;
- activityManager.AcceptInvite.acceptInvite(activityManager, userID, Pointer.NULL, (callbackData, result) -> {
- System.out.println("Discord Returned "+result+" For Accepting invite from "+userID.longValue()+"L");
- });
- }
- public void updatePresence() {
- if (!skyblockStatus.isOnHypixel() || !FeatureRegistry.DISCORD_RICHPRESENCE.isEnabled() || (!skyblockStatus.isOnSkyblock() && FeatureRegistry.DISCORD_RICHPRESENCE.<Boolean>getParameter("disablenotskyblock").getValue())) {
- activityManager.ClearActivity.clearActivity(activityManager, Pointer.NULL, (callbackData, result) -> {
- });
- } else {
- String name = DungeonContext.getDungeonName() == null ? "" : DungeonContext.getDungeonName();
- if (!skyblockStatus.isOnSkyblock()) name ="Somewhere on Hypixel";
- if (name.trim().equals("Your Island")) name = "Private Island";
-
- DiscordActivity latestDiscordActivity = new DiscordActivity();
- latestDiscordActivity.assets = new DiscordActivityAssets();
- latestDiscordActivity.secrets = new DiscordActivitySecrets();
- latestDiscordActivity.party = new DiscordActivityParty();
- latestDiscordActivity.party.discordActivityParty = new DiscordPartySize();
- latestDiscordActivity.timestamps = new DiscordActivityTimestamps();
- GameSDK.writeString(latestDiscordActivity.assets.large_image, "mort");
- GameSDK.writeString(latestDiscordActivity.assets.large_text, "mort");
- GameSDK.writeString(latestDiscordActivity.state, name);
-
- GameSDK.writeString(latestDiscordActivity.party.id, Optional.ofNullable( PartyManager.INSTANCE.getPartyContext()).map(PartyContext::getPartyID).orElse(""));
- latestDiscordActivity.party.discordActivityParty.current_size = new Int32(Optional.ofNullable(PartyManager.INSTANCE.getPartyContext()).map(PartyContext::getPartyRawMembers).map(Set::size).orElse(1));
- latestDiscordActivity.party.discordActivityParty.max_size = new Int32(PartyManager.INSTANCE.getMaxParty());
-
- DungeonContext context = DungeonsGuide.getDungeonsGuide().getDungeonFacade().getContext();
- if (context != null) {
- long init = context.getInit();
- latestDiscordActivity.timestamps.start = new DiscordTimestamp(init);
-
- if (context.getBossfightProcessor() != null) {
- GameSDK.writeString(latestDiscordActivity.details, "Fighting "+context.getBossfightProcessor().getBossName()+": "+context.getBossfightProcessor().getCurrentPhase());
- } else {
- GameSDK.writeString(latestDiscordActivity.details, "Clearing Rooms");
- }
- } else {
- latestDiscordActivity.timestamps.start = new DiscordTimestamp(0);
- GameSDK.writeString(latestDiscordActivity.details, "Dungeons Guide");
- }
- if (PartyManager.INSTANCE.getAskToJoinSecret() != null) {
- GameSDK.writeString(latestDiscordActivity.secrets.join, PartyManager.INSTANCE.getAskToJoinSecret());
- } else {
- GameSDK.writeString(latestDiscordActivity.secrets.join, "");
- }
- activityManager.UpdateActivity.updateActivity(activityManager, latestDiscordActivity, Pointer.NULL, (callbackData, result) -> {
- });
- }
- }
- @Override
- public void run() {
- boolean setup = true;
- int counter = 0;
- while(!Thread.interrupted()) {
- try {
- if (iDiscordCore == null || setup) {
- long lastSetup = lastSetupCode;
- lastSetupCode = setup();
- if (lastSetup != lastSetupCode)
- System.out.println("Discord returned "+lastSetupCode+" for setup "+EDiscordResult.fromValue(lastSetupCode));
- setup = lastSetupCode != EDiscordResult.DiscordResult_Ok.getValue();
- counter = 0;
- } else {
- EDiscordResult eDiscordResult = iDiscordCore.RunCallbacks.runCallbacks(iDiscordCore);
- if (eDiscordResult != EDiscordResult.DiscordResult_Ok) {
- setup = true;
- } else if (ready){
- if (counter == 0)
- updatePresence();
- if (++counter == 15) counter = 0;
- }
- }
- Thread.sleep(16L);
- } catch (Exception e) {e.printStackTrace();}
- }
- if (iDiscordCore != null)
- iDiscordCore.Destroy.destroy(iDiscordCore);
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkChannelId.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserInvitedEvent.java
index 577e1c11..9794dc10 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkChannelId.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserInvitedEvent.java
@@ -16,15 +16,19 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+package kr.syeyoung.dungeonsguide.mod.events.impl;
-package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+import com.jagrosh.discordipc.entities.User;
+import kr.syeyoung.dungeonsguide.mod.discord.InviteHandle;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import net.minecraftforge.fml.common.eventhandler.Event;
-
-public class DiscordNetworkChannelId extends UInt8 {
- public DiscordNetworkChannelId() {
- this(0);
- }
- public DiscordNetworkChannelId(long value) {
- super(value);
- }
+@Data
+@EqualsAndHashCode(callSuper=false)
+@AllArgsConstructor
+public class DiscordUserInvitedEvent extends Event {
+ private User discordUser;
+ private InviteHandle handle;
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserJoinRequestEvent.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserJoinRequestEvent.java
index 28452eed..37252d60 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserJoinRequestEvent.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserJoinRequestEvent.java
@@ -18,7 +18,7 @@
package kr.syeyoung.dungeonsguide.mod.events.impl;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
+import com.jagrosh.discordipc.entities.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -28,6 +28,5 @@ import net.minecraftforge.fml.common.eventhandler.Event;
@EqualsAndHashCode(callSuper=false)
@AllArgsConstructor
public class DiscordUserJoinRequestEvent extends Event {
- private DiscordUser discordUser;
- private boolean isInvite;
+ private User discordUser;
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserUpdateEvent.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserUpdateEvent.java
index 792ff5d3..ee67750f 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserUpdateEvent.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserUpdateEvent.java
@@ -19,7 +19,7 @@
package kr.syeyoung.dungeonsguide.mod.events.impl;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.JDiscordRelation;
+import kr.syeyoung.dungeonsguide.mod.discord.JDiscordRelation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/FeatureRegistry.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/FeatureRegistry.java
index 1908f9a8..c379c17f 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/FeatureRegistry.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/FeatureRegistry.java
@@ -191,7 +191,6 @@ public class FeatureRegistry {
public static SimpleFeature DISCORD_RICHPRESENCE;
public static PartyInviteViewer DISCORD_ASKTOJOIN;
public static PlayingDGAlarm DISCORD_ONLINEALARM;
- public static SimpleFeature DISCORD_DONOTUSE;
public static SimpleFeature DEBUG;
@@ -313,7 +312,6 @@ public class FeatureRegistry {
});
DISCORD_ASKTOJOIN = register(new PartyInviteViewer());
DISCORD_ONLINEALARM = register(new PlayingDGAlarm());
- 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));
DEBUG = register(new FeatureDebug());
ADVANCED_ROOMEDIT = register(new SimpleFeature("Debug", "Room Edit", "Allow editing dungeon rooms\n\nWarning: using this feature can break or freeze your Minecraft\nThis is only for advanced users only", "advanced.roomedit", false) {
{
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyInviteViewer.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyInviteViewer.java
index 91e8414f..1c04429c 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyInviteViewer.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyInviteViewer.java
@@ -20,10 +20,10 @@ package kr.syeyoung.dungeonsguide.mod.features.impl.discord.inviteViewer;
import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityJoinRequestReply;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.RichPresenceManager;
+import kr.syeyoung.dungeonsguide.mod.discord.DiscordIntegrationManager;
import kr.syeyoung.dungeonsguide.mod.events.annotations.DGEventHandler;
import kr.syeyoung.dungeonsguide.mod.events.impl.DGTickEvent;
+import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserInvitedEvent;
import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserJoinRequestEvent;
import kr.syeyoung.dungeonsguide.mod.features.SimpleFeature;
import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
@@ -113,28 +113,28 @@ public class PartyInviteViewer extends SimpleFeature {
if (joinRequest.getAcceptRect().contains(mouseX, mouseY)) {
joinRequest.setReply(PartyJoinRequest.Reply.ACCEPT);
joinRequest.setTtl(60);
- RichPresenceManager.INSTANCE.respond(joinRequest.getDiscordUser().id, EDiscordActivityJoinRequestReply.DiscordActivityJoinRequestReply_Yes);
+ DiscordIntegrationManager.INSTANCE.respondToJoinRequest(joinRequest.getDiscordUser().getId(), PartyJoinRequest.Reply.ACCEPT);
return;
}
if (joinRequest.getDenyRect().contains(mouseX, mouseY)) {
joinRequest.setReply(PartyJoinRequest.Reply.DENY);
joinRequest.setTtl(60);
- RichPresenceManager.INSTANCE.respond(joinRequest.getDiscordUser().id, EDiscordActivityJoinRequestReply.DiscordActivityJoinRequestReply_No);
+ DiscordIntegrationManager.INSTANCE.respondToJoinRequest(joinRequest.getDiscordUser().getId(), PartyJoinRequest.Reply.DENY);
return;
}
if (joinRequest.getIgnoreRect().contains(mouseX, mouseY)) {
joinRequest.setReply(PartyJoinRequest.Reply.IGNORE);
joinRequest.setTtl(60);
- RichPresenceManager.INSTANCE.respond(joinRequest.getDiscordUser().id, EDiscordActivityJoinRequestReply.DiscordActivityJoinRequestReply_Ignore);
+ DiscordIntegrationManager.INSTANCE.respondToJoinRequest(joinRequest.getDiscordUser().getId(), PartyJoinRequest.Reply.IGNORE);
return;
}
} else {
if (joinRequest.getAcceptRect().contains(mouseX, mouseY)) {
joinRequest.setReply(PartyJoinRequest.Reply.ACCEPT);
joinRequest.setTtl(60);
- RichPresenceManager.INSTANCE.accept(joinRequest.getDiscordUser().id);
+ DiscordIntegrationManager.INSTANCE.acceptInvite(joinRequest.getHandle());
return;
}
@@ -211,7 +211,7 @@ public class PartyInviteViewer extends SimpleFeature {
Gui.drawRect(0, 0,width,height, 0xFF23272a);
Gui.drawRect(2, 2, width-2, height-2, 0XFF2c2f33);
{
- String avatar = "https://cdn.discordapp.com/avatars/"+Long.toUnsignedString(partyJoinRequest.getDiscordUser().id.longValue())+"/"+partyJoinRequest.getAvatar()+"."+(partyJoinRequest.getAvatar().startsWith("a_") ? "gif":"png");
+ String avatar = "https://cdn.discordapp.com/avatars/"+partyJoinRequest.getDiscordUser().getId()+"/"+partyJoinRequest.getAvatar()+"."+(partyJoinRequest.getAvatar().startsWith("a_") ? "gif":"png");
Future<ImageTexture> loadedImageFuture = loadImage(avatar);
ImageTexture loadedImage = null;
if (loadedImageFuture.isDone()) {
@@ -315,7 +315,16 @@ public class PartyInviteViewer extends SimpleFeature {
PartyJoinRequest partyInvite = new PartyJoinRequest();
partyInvite.setDiscordUser(event.getDiscordUser());
partyInvite.setExpire(System.currentTimeMillis() + 30000L);
- partyInvite.setInvite(event.isInvite());
+ partyInvite.setInvite(false);
+ joinRequests.add(partyInvite);
+ }
+ @DGEventHandler(triggerOutOfSkyblock = true)
+ public void onDiscordUserJoinRequest(DiscordUserInvitedEvent event) {
+ PartyJoinRequest partyInvite = new PartyJoinRequest();
+ partyInvite.setDiscordUser(event.getDiscordUser());
+ partyInvite.setHandle(event.getHandle());
+ partyInvite.setExpire(System.currentTimeMillis() + 30000L);
+ partyInvite.setInvite(true);
joinRequests.add(partyInvite);
}
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyJoinRequest.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyJoinRequest.java
index a50966dc..98d601b9 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyJoinRequest.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyJoinRequest.java
@@ -18,8 +18,8 @@
package kr.syeyoung.dungeonsguide.mod.features.impl.discord.inviteViewer;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.GameSDK;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
+import com.jagrosh.discordipc.entities.User;
+import kr.syeyoung.dungeonsguide.mod.discord.InviteHandle;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
@@ -28,13 +28,14 @@ import java.awt.*;
@Data
public class PartyJoinRequest {
- private DiscordUser discordUser;
+ private User discordUser;
+ private InviteHandle handle;
- public void setDiscordUser(DiscordUser discordUser) {
+ public void setDiscordUser(User discordUser) {
this.discordUser = discordUser;
- username = GameSDK.readString(discordUser.username);
- discriminator = GameSDK.readString(discordUser.discriminator);
- avatar = GameSDK.readString(discordUser.avatar);
+ username = discordUser.getName();
+ discriminator = discordUser.getDiscriminator();
+ avatar= discordUser.getEffectiveAvatarUrl();
}
private String username, discriminator, avatar;
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInvite.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInvite.java
index 3f9cb19d..a9aed2d7 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInvite.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInvite.java
@@ -18,14 +18,8 @@
package kr.syeyoung.dungeonsguide.mod.features.impl.discord.invteTooltip;
-import com.sun.jna.Pointer;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityActionType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordRelationshipType;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct.IDiscordActivityManager;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct.IDiscordCore;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.JDiscordRelation;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.RichPresenceManager;
+import kr.syeyoung.dungeonsguide.mod.discord.JDiscordRelation;
+import kr.syeyoung.dungeonsguide.mod.discord.DiscordIntegrationManager;
import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
import kr.syeyoung.dungeonsguide.mod.gui.elements.*;
import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
@@ -107,10 +101,10 @@ public class MTooltipInvite extends MModal {
}
String searchTxt = search.getText().trim().toLowerCase();
- for (JDiscordRelation value : RichPresenceManager.INSTANCE.getRelationMap().values()) {
+ for (JDiscordRelation value : DiscordIntegrationManager.INSTANCE.getRelationMap().values()) {
// if (value.getDiscordActivity().getApplicationId() != 816298079732498473L) continue;
- if (value.getDiscordRelationshipType() == EDiscordRelationshipType.DiscordRelationshipType_Blocked) continue;
- if (!searchTxt.isEmpty() && !(value.getDiscordUser().getUsername().toLowerCase().contains(searchTxt))) continue;
+ if (value.getRelationType() == JDiscordRelation.DiscordRelationType.Blocked) continue;
+ if (!searchTxt.isEmpty() && !(value.getDiscordUser().getName().toLowerCase().contains(searchTxt))) continue;
list.add(new MTooltipInviteElement(value, invited.contains(value.getDiscordUser().getId()), this::invite));
}
setBounds(getBounds());
@@ -118,10 +112,6 @@ public class MTooltipInvite extends MModal {
public void invite(long id) {
invited.add(id);
- IDiscordCore iDiscordCore = RichPresenceManager.INSTANCE.getIDiscordCore();
- IDiscordActivityManager iDiscordActivityManager = iDiscordCore.GetActivityManager.getActivityManager(iDiscordCore);
- iDiscordActivityManager.SendInvite.sendInvite(iDiscordActivityManager, new DiscordSnowflake(id), EDiscordActivityActionType.DiscordActivityActionType_Join, "Dungeons Guide RPC Invite TESt", Pointer.NULL, (callbackData, result) -> {
- System.out.println("Discord returned "+result+" For inviting "+id);
- });
+ DiscordIntegrationManager.INSTANCE.sendInvite(Long.toUnsignedString(id), "Pls join my game");
}
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInviteElement.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInviteElement.java
index ca913670..f895ad4d 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInviteElement.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInviteElement.java
@@ -19,7 +19,7 @@
package kr.syeyoung.dungeonsguide.mod.features.impl.discord.invteTooltip;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.JDiscordRelation;
+import kr.syeyoung.dungeonsguide.mod.discord.JDiscordRelation;
import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
import kr.syeyoung.dungeonsguide.mod.features.impl.discord.inviteViewer.ImageTexture;
import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
@@ -51,7 +51,7 @@ public class MTooltipInviteElement extends MPanel {
invite.setOnActionPerformed(() -> {
if (invite.isEnabled())
- inviteCallback.accept(jDiscordRelation.getDiscordUser().getId());
+ inviteCallback.accept(jDiscordRelation.getDiscordUser().getIdLong());
invite.setText("Sent");
invite.setRoundness(2);
@@ -78,8 +78,8 @@ public class MTooltipInviteElement extends MPanel {
}
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
- if (!relation.getDiscordUser().getAvatar().isEmpty()){
- String avatar = "https://cdn.discordapp.com/avatars/"+Long.toUnsignedString(relation.getDiscordUser().getId())+"/"+relation.getDiscordUser().getAvatar()+"."+(relation.getDiscordUser().getAvatar().startsWith("a_") ? "gif":"png");
+ if (!relation.getDiscordUser().getEffectiveAvatarUrl().isEmpty()){
+ String avatar = relation.getDiscordUser().getEffectiveAvatarUrl();
Future<ImageTexture> loadedImageFuture = FeatureRegistry.DISCORD_ASKTOJOIN.loadImage(avatar);
ImageTexture loadedImage = null;
if (loadedImageFuture.isDone()) {
@@ -95,7 +95,7 @@ public class MTooltipInviteElement extends MPanel {
Gui.drawRect(3, 3, bounds.height - 6, bounds.height-6, 0xFF4E4E4E);
}
}
- fr.drawString(relation.getDiscordUser().getUsername()+"#"+relation.getDiscordUser().getDiscriminator(), bounds.height,(bounds.height-fr.FONT_HEIGHT)/2, -1);
+ fr.drawString(relation.getDiscordUser().getName()+"#"+relation.getDiscordUser().getDiscriminator(), bounds.height,(bounds.height-fr.FONT_HEIGHT)/2, -1);
}
@Override
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/onlinealarm/PlayingDGAlarm.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/onlinealarm/PlayingDGAlarm.java
index 1a8dbe91..5ce63a0b 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/onlinealarm/PlayingDGAlarm.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/onlinealarm/PlayingDGAlarm.java
@@ -20,9 +20,7 @@ package kr.syeyoung.dungeonsguide.mod.features.impl.discord.onlinealarm;
import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
-import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordRelationshipType;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.JDiscordActivity;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.JDiscordRelation;
+import kr.syeyoung.dungeonsguide.mod.discord.JDiscordRelation;
import kr.syeyoung.dungeonsguide.mod.events.annotations.DGEventHandler;
import kr.syeyoung.dungeonsguide.mod.events.impl.DGTickEvent;
import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserUpdateEvent;
@@ -103,7 +101,7 @@ public class PlayingDGAlarm extends SimpleFeature {
Gui.drawRect(0, 0,width,height, 0xFF23272a);
Gui.drawRect(2, 2, width-2, height-2, 0XFF2c2f33);
{
- String avatar = "https://cdn.discordapp.com/avatars/"+Long.toUnsignedString(online.getJDiscordRelation().getDiscordUser().getId())+"/"+online.getJDiscordRelation().getDiscordUser().getAvatar()+"."+(online.getJDiscordRelation().getDiscordUser().getAvatar().startsWith("a_") ? "gif":"png");
+ String avatar = online.jDiscordRelation.getDiscordUser().getEffectiveAvatarUrl();
Future<ImageTexture> loadedImageFuture = FeatureRegistry.DISCORD_ASKTOJOIN.loadImage(avatar);
ImageTexture loadedImage = null;
if (loadedImageFuture.isDone()) {
@@ -129,11 +127,11 @@ public class PlayingDGAlarm extends SimpleFeature {
GlStateManager.pushMatrix();
GlStateManager.scale(3.0,3.0,1.0);
- fr.drawString(online.getJDiscordRelation().getDiscordUser().getUsername()+"", 0,0, 0xFFFFFFFF, true);
+ fr.drawString(online.getJDiscordRelation().getDiscordUser().getName()+"", 0,0, 0xFFFFFFFF, true);
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
- GlStateManager.translate(fr.getStringWidth(online.getJDiscordRelation().getDiscordUser().getUsername()+"") * 3 + 1, (int)(fr.FONT_HEIGHT*1.5), 0);
+ GlStateManager.translate(fr.getStringWidth(online.getJDiscordRelation().getDiscordUser().getName()+"") * 3 + 1, (int)(fr.FONT_HEIGHT*1.5), 0);
fr.drawString("#"+online.getJDiscordRelation().getDiscordUser().getDiscriminator(), 0,0,0xFFaaaaaa, true);
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
@@ -155,19 +153,19 @@ public class PlayingDGAlarm extends SimpleFeature {
@DGEventHandler(triggerOutOfSkyblock = true)
public void onDiscordUserUpdate(DiscordUserUpdateEvent event) {
JDiscordRelation prev = event.getPrev(), current = event.getCurrent();
+ if (prev == null) return;
if (!isDisplayable(prev) && isDisplayable(current)) {
notif.add(new PlayerOnline(current, System.currentTimeMillis()+3000));
}
}
public boolean isDisplayable(JDiscordRelation jDiscordRelation) {
- EDiscordRelationshipType relationshipType = jDiscordRelation.getDiscordRelationshipType();
- if (relationshipType == EDiscordRelationshipType.DiscordRelationshipType_Blocked) return false;
- if (relationshipType == EDiscordRelationshipType.DiscordRelationshipType_None) return false;
- if (relationshipType == EDiscordRelationshipType.DiscordRelationshipType_PendingIncoming) return false;
- if (relationshipType == EDiscordRelationshipType.DiscordRelationshipType_PendingOutgoing) return false;
-
- JDiscordActivity jDiscordActivity = jDiscordRelation.getDiscordActivity();
- return jDiscordActivity.getApplicationId() == 816298079732498473L;
+ JDiscordRelation.DiscordRelationType relationshipType = jDiscordRelation.getRelationType();
+ if (relationshipType == JDiscordRelation.DiscordRelationType.Blocked) return false;
+ if (relationshipType == JDiscordRelation.DiscordRelationType.None) return false;
+ if (relationshipType == JDiscordRelation.DiscordRelationType.PendingIncoming) return false;
+ if (relationshipType == JDiscordRelation.DiscordRelationType.PendingOutgoing) return false;
+
+ return "816298079732498473".equals(jDiscordRelation.getApplicationId());
}
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/PanelPartyFinder.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/PanelPartyFinder.java
index a59b32a3..0314c9e2 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/PanelPartyFinder.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/PanelPartyFinder.java
@@ -20,7 +20,7 @@ package kr.syeyoung.dungeonsguide.mod.features.impl.party.customgui;
import kr.syeyoung.dungeonsguide.mod.config.guiconfig.GuiConfigV2;
-import kr.syeyoung.dungeonsguide.mod.discord.rpc.RichPresenceManager;
+import kr.syeyoung.dungeonsguide.mod.discord.DiscordIntegrationManager;
import kr.syeyoung.dungeonsguide.mod.events.impl.WindowUpdateEvent;
import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
import kr.syeyoung.dungeonsguide.mod.features.impl.discord.invteTooltip.MTooltipInvite;
@@ -118,7 +118,7 @@ public class PanelPartyFinder extends MPanel {
discordInvite = new MButton();
discordInvite.setText("Invite Discord Friends");
discordInvite.setOnActionPerformed(() -> {
- if (RichPresenceManager.INSTANCE.getLastSetupCode() == -9999) {
+ if (!DiscordIntegrationManager.INSTANCE.isLoaded()) {
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);
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/GLCursors.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/GLCursors.java
index 23bab954..fd7f7cba 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/GLCursors.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/GLCursors.java
@@ -20,6 +20,7 @@ package kr.syeyoung.dungeonsguide.mod.utils.cursor;
import com.google.common.base.Throwables;
+import com.sun.jna.Native;
import com.sun.jna.Pointer;
import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
import net.minecraft.client.Minecraft;
@@ -186,14 +187,14 @@ public class GLCursors {
Pointer hIcon = user32
.LoadCursorW(Pointer.NULL, cursor);
long ptrVal = Pointer.nativeValue(hIcon);
- ByteBuffer handle = BufferUtils.createByteBuffer(Pointer.SIZE); // Why does it have to be direct? well it crashes without it.
+ ByteBuffer handle = BufferUtils.createByteBuffer(Native.POINTER_SIZE); // Why does it have to be direct? well it crashes without it.
if (handle.order() == ByteOrder.LITTLE_ENDIAN) {
- for (int i = 0; i < Pointer.SIZE; i++) {
+ for (int i = 0; i < Native.POINTER_SIZE; i++) {
byte value = (byte) ((ptrVal >> i * 8) & 0xFF);
handle.put(value);
}
} else {
- for (int i = Pointer.SIZE; i >= 0; i++) {
+ for (int i = Native.POINTER_SIZE; i >= 0; i++) {
byte value = (byte) ((ptrVal >> i * 8) & 0xFF);
handle.put(value);
}
diff --git a/mod/src/main/resources/gamesdk/aarch64/libdiscord_game_sdk.dylib b/mod/src/main/resources/gamesdk/aarch64/libdiscord_game_sdk.dylib
new file mode 100644
index 00000000..8f086062
--- /dev/null
+++ b/mod/src/main/resources/gamesdk/aarch64/libdiscord_game_sdk.dylib
Binary files differ
diff --git a/mod/src/main/resources/gamesdk/darwin/libdiscord_game_sdk.dylib b/mod/src/main/resources/gamesdk/darwin/libdiscord_game_sdk.dylib
deleted file mode 100644
index 24045f79..00000000
--- a/mod/src/main/resources/gamesdk/darwin/libdiscord_game_sdk.dylib
+++ /dev/null
Binary files differ
diff --git a/mod/src/main/resources/gamesdk/linux/libdiscord_game_sdk.so b/mod/src/main/resources/gamesdk/linux/libdiscord_game_sdk.so
deleted file mode 100644
index e4657606..00000000
--- a/mod/src/main/resources/gamesdk/linux/libdiscord_game_sdk.so
+++ /dev/null
Binary files differ
diff --git a/mod/src/main/resources/gamesdk/win-x64/discord_game_sdk.dll b/mod/src/main/resources/gamesdk/win-x64/discord_game_sdk.dll
deleted file mode 100644
index 10a8928f..00000000
--- a/mod/src/main/resources/gamesdk/win-x64/discord_game_sdk.dll
+++ /dev/null
Binary files differ
diff --git a/mod/src/main/resources/gamesdk/win-x86/discord_game_sdk.dll b/mod/src/main/resources/gamesdk/win-x86/discord_game_sdk.dll
deleted file mode 100644
index 8f1ee0a6..00000000
--- a/mod/src/main/resources/gamesdk/win-x86/discord_game_sdk.dll
+++ /dev/null
Binary files differ
diff --git a/mod/src/main/resources/gamesdk/x86/discord_game_sdk.dll b/mod/src/main/resources/gamesdk/x86/discord_game_sdk.dll
new file mode 100644
index 00000000..45b9bb17
--- /dev/null
+++ b/mod/src/main/resources/gamesdk/x86/discord_game_sdk.dll
Binary files differ
diff --git a/mod/src/main/resources/gamesdk/x86_64/discord_game_sdk.dll b/mod/src/main/resources/gamesdk/x86_64/discord_game_sdk.dll
new file mode 100644
index 00000000..be946ea7
--- /dev/null
+++ b/mod/src/main/resources/gamesdk/x86_64/discord_game_sdk.dll
Binary files differ
diff --git a/mod/src/main/resources/gamesdk/x86_64/libdiscord_game_sdk.dylib b/mod/src/main/resources/gamesdk/x86_64/libdiscord_game_sdk.dylib
new file mode 100644
index 00000000..3402426b
--- /dev/null
+++ b/mod/src/main/resources/gamesdk/x86_64/libdiscord_game_sdk.dylib
Binary files differ
diff --git a/mod/src/main/resources/gamesdk/x86_64/libdiscord_game_sdk.so b/mod/src/main/resources/gamesdk/x86_64/libdiscord_game_sdk.so
new file mode 100644
index 00000000..9dacf946
--- /dev/null
+++ b/mod/src/main/resources/gamesdk/x86_64/libdiscord_game_sdk.so
Binary files differ