diff options
author | syeyoung <cyong06@naver.com> | 2021-07-18 14:35:56 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-07-18 14:35:56 +0900 |
commit | bceb0858a8215dad1f70342035e26ac45b9d970d (patch) | |
tree | b98717126b61a6b8e080e08e129df7f1b17107cd /src/main/java | |
parent | 42e13e8a3dfe7e28bf8b71cb8cdcaf727e9c960c (diff) | |
download | Skyblock-Dungeons-Guide-bceb0858a8215dad1f70342035e26ac45b9d970d.tar.gz Skyblock-Dungeons-Guide-bceb0858a8215dad1f70342035e26ac45b9d970d.tar.bz2 Skyblock-Dungeons-Guide-bceb0858a8215dad1f70342035e26ac45b9d970d.zip |
try and catch on party manager
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java index a01f1658..181d66cb 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java @@ -360,25 +360,31 @@ public class PartyManager implements StompMessageHandler { } @SubscribeEvent public void onTick(TickEvent.ClientTickEvent clientTickEvent) { - if (clientTickEvent.phase == TickEvent.Phase.START && Minecraft.getMinecraft().thePlayer != null && minimumNext < System.currentTimeMillis() ) { - if (checkPlayer == 1) { - checkPlayer = -1; - sendChat.add(new Tuple<>("/pl", () -> {checkPlayer = 2;})); - } - if (!sendChat.isEmpty()) { - Tuple<String, Runnable> tuple = sendChat.poll(); - Minecraft.getMinecraft().thePlayer.sendChatMessage(tuple.getFirst()); - if (tuple.getSecond() != null) - tuple.getSecond().run(); - minimumNext = System.currentTimeMillis()+ 200; - DungeonsGuide.sendDebugChat(new ChatComponentText("Sending "+tuple.getFirst()+" Secretly")); + try { + if (clientTickEvent.phase == TickEvent.Phase.START && Minecraft.getMinecraft().thePlayer != null && minimumNext < System.currentTimeMillis()) { + if (checkPlayer == 1) { + checkPlayer = -1; + sendChat.add(new Tuple<>("/pl", () -> { + checkPlayer = 2; + })); + } + if (!sendChat.isEmpty()) { + Tuple<String, Runnable> tuple = sendChat.poll(); + Minecraft.getMinecraft().thePlayer.sendChatMessage(tuple.getFirst()); + if (tuple.getSecond() != null) + tuple.getSecond().run(); + minimumNext = System.currentTimeMillis() + 200; + DungeonsGuide.sendDebugChat(new ChatComponentText("Sending " + tuple.getFirst() + " Secretly")); + } } - + } catch (Throwable e) { + e.printStackTrace(); } } @SubscribeEvent public void onHypixelJoin(HypixelJoinedEvent skyblockJoinedEvent) { + minimumNext = System.currentTimeMillis() + 1000; sendChat.add(new Tuple<>("/pl", () -> {partyJoin = 1;})); } |