aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-07-18 18:02:44 +0900
committersyeyoung <cyong06@naver.com>2021-07-18 18:02:44 +0900
commita9e35133d52e271b70a06d77747cfbe867e065e3 (patch)
tree9543c11362a3da9e35274a79e1120c24e966176f /src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java
parentbceb0858a8215dad1f70342035e26ac45b9d970d (diff)
downloadSkyblock-Dungeons-Guide-a9e35133d52e271b70a06d77747cfbe867e065e3.tar.gz
Skyblock-Dungeons-Guide-a9e35133d52e271b70a06d77747cfbe867e065e3.tar.bz2
Skyblock-Dungeons-Guide-a9e35133d52e271b70a06d77747cfbe867e065e3.zip
Move trivia answers to DG Backend StaticResource API (TM)
Also Move Dungeon Bonus Score to that
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java b/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java
index a169eeda..f2bdad43 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java
@@ -35,6 +35,7 @@ import kr.syeyoung.dungeonsguide.stomp.CloseListener;
import kr.syeyoung.dungeonsguide.stomp.StompClient;
import kr.syeyoung.dungeonsguide.stomp.StompInterface;
import kr.syeyoung.dungeonsguide.utils.AhUtils;
+import kr.syeyoung.dungeonsguide.wsresource.StaticResourceCache;
import lombok.Getter;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.IResourcePack;
@@ -125,6 +126,7 @@ public class DungeonsGuide implements DGInterface, CloseListener {
RichPresenceManager.INSTANCE.setup();
MinecraftForge.EVENT_BUS.register(RichPresenceManager.INSTANCE);
MinecraftForge.EVENT_BUS.register(PartyManager.INSTANCE);
+ MinecraftForge.EVENT_BUS.register(StaticResourceCache.INSTANCE);
MinecraftForge.EVENT_BUS.register(PartyInviteViewer.INSTANCE);
AhUtils.registerTimer();
@@ -178,13 +180,6 @@ public class DungeonsGuide implements DGInterface, CloseListener {
t.printStackTrace();
}
}
- private void copy(InputStream inputStream, File f) throws IOException {
- FileOutputStream fos = new FileOutputStream(f);
- IOUtils.copy(inputStream, fos);
- fos.flush();
- fos.close();
- inputStream.close();
- }
@Getter
private File configDir;
@@ -205,15 +200,12 @@ public class DungeonsGuide implements DGInterface, CloseListener {
}
public void connectStomp() {
- ex.schedule(new Runnable() {
- @Override
- public void run() {
- try {
- stompConnection = new StompClient(new URI(stompURL), authenticator.getToken(), DungeonsGuide.this);
- MinecraftForge.EVENT_BUS.post(new StompConnectedEvent(stompConnection));
- } catch (Exception e) {
- e.printStackTrace();
- }
+ ex.schedule(() -> {
+ try {
+ stompConnection = new StompClient(new URI(stompURL), authenticator.getToken(), DungeonsGuide.this);
+ MinecraftForge.EVENT_BUS.post(new StompConnectedEvent(stompConnection));
+ } catch (Exception e) {
+ e.printStackTrace();
}
}, 5L, TimeUnit.SECONDS);
}