diff --git a/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTTracer_15.java b/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTTracer_15.java index 27de164..5c1cc63 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTTracer_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTTracer_15.java @@ -45,7 +45,7 @@ class TNTTracer_15 { synchronizer.notifyAll(); } }, 1, 20); - Thread traceRenderer = new Thread(() -> { + Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> { while (true) { synchronized (synchronizer) { try { @@ -57,9 +57,6 @@ class TNTTracer_15 { run(); } }); - traceRenderer.setDaemon(true); - traceRenderer.setName("Trace Renderer"); - traceRenderer.start(); TNTTracer_15.tracerCallback = tracerCallback; TNTTracer_15.tracerCallbackUpdatePoints = tracerCallbackUpdatePoints;