aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-07-18 14:35:56 +0900
committersyeyoung <cyong06@naver.com>2021-07-18 14:35:56 +0900
commitbceb0858a8215dad1f70342035e26ac45b9d970d (patch)
treeb98717126b61a6b8e080e08e129df7f1b17107cd /src/main/java/kr/syeyoung/dungeonsguide
parent42e13e8a3dfe7e28bf8b71cb8cdcaf727e9c960c (diff)
downloadSkyblock-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/kr/syeyoung/dungeonsguide')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java32
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;}));
}