aboutsummaryrefslogtreecommitdiff
path: root/common/src/main
diff options
context:
space:
mode:
authorhackthetime <l4bg0jb7@duck.com>2023-11-16 11:24:20 +0100
committerhackthetime <l4bg0jb7@duck.com>2023-11-16 11:24:20 +0100
commitca8c9a40cbd393ddc1559382fb29a7f3a7c3a646 (patch)
tree78dd4d4083879075c3661b2ee224b3bdd1ca2d56 /common/src/main
parentce208c31079689527a489eab2b54765591a8507f (diff)
downloadBBsentials-ca8c9a40cbd393ddc1559382fb29a7f3a7c3a646.tar.gz
BBsentials-ca8c9a40cbd393ddc1559382fb29a7f3a7c3a646.tar.bz2
BBsentials-ca8c9a40cbd393ddc1559382fb29a7f3a7c3a646.zip
working on moulconfig. re-added debug thread instead of using execution service because it slowly but surely takes all threads.
Diffstat (limited to 'common/src/main')
-rw-r--r--common/src/main/java/de/hype/bbsentials/common/client/BBsentials.java8
-rw-r--r--common/src/main/java/de/hype/bbsentials/common/client/DebugThread.java6
2 files changed, 12 insertions, 2 deletions
diff --git a/common/src/main/java/de/hype/bbsentials/common/client/BBsentials.java b/common/src/main/java/de/hype/bbsentials/common/client/BBsentials.java
index 262ed8d..fbb7824 100644
--- a/common/src/main/java/de/hype/bbsentials/common/client/BBsentials.java
+++ b/common/src/main/java/de/hype/bbsentials/common/client/BBsentials.java
@@ -7,7 +7,6 @@ import de.hype.bbsentials.common.mclibraries.EnvironmentCore;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
public class BBsentials {
public static Config config;
@@ -18,6 +17,7 @@ public class BBsentials {
public static SplashStatusUpdateListener splashStatusUpdateListener;
public static Thread bbthread;
public static Chat chat = new Chat();
+ public static Thread debugThread;
public static Config getConfig() {
return config;
@@ -70,7 +70,11 @@ public class BBsentials {
public static void init() {
config = Config.load();
- executionService.scheduleAtFixedRate(EnvironmentCore.debug, 0, 20, TimeUnit.SECONDS);
+ debugThread = new Thread(
+ EnvironmentCore.debug
+ );
+ debugThread.start();
+ debugThread.setName("Debug Thread");
if (Config.isBingoTime() || config.overrideBingoTime()) {
connectToBBserver();
}
diff --git a/common/src/main/java/de/hype/bbsentials/common/client/DebugThread.java b/common/src/main/java/de/hype/bbsentials/common/client/DebugThread.java
index 74a7757..239df11 100644
--- a/common/src/main/java/de/hype/bbsentials/common/client/DebugThread.java
+++ b/common/src/main/java/de/hype/bbsentials/common/client/DebugThread.java
@@ -8,7 +8,13 @@ public interface DebugThread extends Runnable {
@Override
default void run() {
+ while (true) {
loop();
+ try {
+ Thread.sleep(20000);
+ } catch (InterruptedException e) {
+ }
+ }
//place a breakpoint for only this thread here.
}