aboutsummaryrefslogtreecommitdiff
path: root/common/src/main
diff options
context:
space:
mode:
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.
}