From 9ebd9154d9bde33ebc936a23ca73dd51f6fe2b39 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 18 Aug 2023 20:55:46 +0700 Subject: [PATCH] try --- .../chipmunk/chipmunkmod/modules/SelfCare.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/SelfCare.java b/src/main/java/land/chipmunk/chipmunkmod/modules/SelfCare.java index 81c0ed6..4e919e9 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/SelfCare.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/SelfCare.java @@ -143,13 +143,17 @@ public class SelfCare extends Listener { public void packetReceived(PlayerPositionLookS2CPacket packet) { if (timer == null) return; - positionPacketsPerSecond++; + try { + positionPacketsPerSecond++; - timer.schedule(new TimerTask() { - @Override - public void run() { - positionPacketsPerSecond--; - } - }, 1000); + timer.schedule(new TimerTask() { + @Override + public void run() { + positionPacketsPerSecond--; + } + }, 1000); + } catch (Exception e) { + e.printStackTrace(); + } } }