diff options
author | syeyoung <cyong06@naver.com> | 2021-07-18 18:02:44 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-07-18 18:02:44 +0900 |
commit | a9e35133d52e271b70a06d77747cfbe867e065e3 (patch) | |
tree | 9543c11362a3da9e35274a79e1120c24e966176f /src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java | |
parent | bceb0858a8215dad1f70342035e26ac45b9d970d (diff) | |
download | Skyblock-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-x | src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java | 24 |
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); } |