From 993e0bbe620f5964a6fa71781c829650fc24d7c6 Mon Sep 17 00:00:00 2001 From: jojo Date: Sun, 19 Jul 2020 08:13:04 +0200 Subject: [PATCH] Fix traceRenderer, Bukkit.getScheduler --- .../src/de/steamwar/bausystem/tracer/TNTTracer_15.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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;