aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/e.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-03-06 09:04:04 +0900
committersyeyoung <cyong06@naver.com>2021-03-06 09:04:04 +0900
commitd07cfe08841302ad1ce1e29902d06c4c439a589f (patch)
tree20f4b7d5f6fea746a9298a4c356f6eb6e497fd1c /src/main/java/kr/syeyoung/dungeonsguide/e.java
parent55e475a31c722a3e9e3bd3216bc0e0d396b6f359 (diff)
downloadSkyblock-Dungeons-Guide-d07cfe08841302ad1ce1e29902d06c4c439a589f.tar.gz
Skyblock-Dungeons-Guide-d07cfe08841302ad1ce1e29902d06c4c439a589f.tar.bz2
Skyblock-Dungeons-Guide-d07cfe08841302ad1ce1e29902d06c4c439a589f.zip
ssl better
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/e.java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/e.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/e.java b/src/main/java/kr/syeyoung/dungeonsguide/e.java
index 5bc3f0d7..478ea8b5 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/e.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/e.java
@@ -1,7 +1,5 @@
package kr.syeyoung.dungeonsguide;
-import com.jagrosh.discordipc.entities.RichPresence;
-import com.jagrosh.discordipc.exceptions.NoDiscordClientException;
import kr.syeyoung.dungeonsguide.commands.*;
import kr.syeyoung.dungeonsguide.config.Config;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoomInfoRegistry;
@@ -10,6 +8,7 @@ import kr.syeyoung.dungeonsguide.eventlistener.FeatureListener;
import kr.syeyoung.dungeonsguide.eventlistener.PacketListener;
import kr.syeyoung.dungeonsguide.events.StompConnectedEvent;
import kr.syeyoung.dungeonsguide.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.party.PartyManager;
import kr.syeyoung.dungeonsguide.stomp.CloseListener;
import kr.syeyoung.dungeonsguide.stomp.StompClient;
import kr.syeyoung.dungeonsguide.stomp.StompInterface;
@@ -69,6 +68,9 @@ public class e implements c, CloseListener {
@Getter
CommandReparty commandReparty;
+
+ private String stompURL = "wss://dungeonsguide.kro.kr/ws";
+// private String stompURL = "ws://localhost/ws";
public void init(FMLInitializationEvent event) {
ProgressManager.ProgressBar progressbar = ProgressManager.push("DungeonsGuide", 4);
@@ -92,6 +94,10 @@ public class e implements c, CloseListener {
MinecraftForge.EVENT_BUS.register(new PacketListener());
MinecraftForge.EVENT_BUS.register(new Keybinds());
+ RichPresenceManager.INSTANCE.setup();
+ MinecraftForge.EVENT_BUS.register(RichPresenceManager.INSTANCE);
+ MinecraftForge.EVENT_BUS.register(PartyManager.INSTANCE);
+
AhUtils.registerTimer();
progressbar.step("Downloading Roomdatas");
@@ -103,18 +109,14 @@ public class e implements c, CloseListener {
Keybinds.register();
+
progressbar.step("Opening connection");
try {
- stompConnection = new StompClient(new URI("wss://dungeonsguide.kro.kr/ws"), authenticator.c(), this);
+ stompConnection = new StompClient(new URI(stompURL), authenticator.c(), this);
+ MinecraftForge.EVENT_BUS.post(new StompConnectedEvent(stompConnection));
} catch (Exception e) {
throw new RuntimeException(e);
}
- try {
- RichPresenceManager.INSTANCE.setup();
- } catch (NoDiscordClientException e) {
- e.printStackTrace();
- }
- MinecraftForge.EVENT_BUS.register(RichPresenceManager.INSTANCE);
progressbar.step("Loading Config");
@@ -169,11 +171,10 @@ public class e implements c, CloseListener {
@Override
public void run() {
try {
- stompConnection = new StompClient(new URI("wss://dungeonsguide.kro.kr/ws"), authenticator.c(), e.this);
+ stompConnection = new StompClient(new URI(stompURL), authenticator.c(), e.this);
MinecraftForge.EVENT_BUS.post(new StompConnectedEvent(stompConnection));
} catch (Exception e) {
e.printStackTrace();
- connectStomp();
}
}
}, 5L, TimeUnit.SECONDS);