This commit is contained in:
Chayapak 2023-08-18 20:55:46 +07:00
parent 6ea08ab4dc
commit 9ebd9154d9

View file

@ -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();
}
}
}