From 6985663cbf00cc1b070efc5936ca9aabf4e8442e Mon Sep 17 00:00:00 2001 From: TudbuT Date: Sat, 5 Oct 2024 11:24:46 +0200 Subject: [PATCH] fix a crash --- .../de/com/baseband/client/feature/modules/client/Ping.java | 4 ++-- .../java/de/com/baseband/client/registry/Configuration.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/src/main/java/de/com/baseband/client/feature/modules/client/Ping.java b/Client/src/main/java/de/com/baseband/client/feature/modules/client/Ping.java index bd7ad47..2e26184 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/modules/client/Ping.java +++ b/Client/src/main/java/de/com/baseband/client/feature/modules/client/Ping.java @@ -58,7 +58,7 @@ public class Ping extends Feature { } @Override - public void onTick() { + public synchronized void onTick() { while (true) { PacketHolder holder = this.holderSend.peek(); if(holder == null || !holder.passed()) @@ -75,7 +75,7 @@ public class Ping extends Feature { } } - public void onDisable() { + public synchronized void onDisable() { totalRecieved = 0; totalSent = 0; if(notIngame()) { diff --git a/Client/src/main/java/de/com/baseband/client/registry/Configuration.java b/Client/src/main/java/de/com/baseband/client/registry/Configuration.java index 39ed508..c597a23 100644 --- a/Client/src/main/java/de/com/baseband/client/registry/Configuration.java +++ b/Client/src/main/java/de/com/baseband/client/registry/Configuration.java @@ -69,7 +69,7 @@ public class Configuration { } } if(fullDB.getSub("PlayerData") != null) - PlayerDB.Data.cloneFrom(fullDB.getSub("PlayerData")); + PlayerDB.Data.cloneFrom(fullDB.getSub("PlayerData")); } public static TCN asTCN() {