diff --git a/BauSystem_15/src/de/steamwar/bausystem/tracer/PlayerTraceCache_15.java b/BauSystem_15/src/de/steamwar/bausystem/tracer/PlayerTraceCache_15.java index 922cc31..1af3c95 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/tracer/PlayerTraceCache_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/tracer/PlayerTraceCache_15.java @@ -25,6 +25,11 @@ public class PlayerTraceCache_15 { private boolean hiding = false; + private PlayerTraceCache_15 instance; + { + instance = this; + } + public PlayerTraceCache_15() { this.pLocation = new float[]{0.0F, 0.0F, 0.0F}; } @@ -52,7 +57,14 @@ public class PlayerTraceCache_15 { } public void show(Player player, TNTCallbackShow.ShowMode showMode) { - if (hiding) return; + if (hiding) { + try { + instance.wait(1000); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + if (hiding) return; + } if (positions.length == 0 || positions.length % 3 != 0) return; for (int i = 0; i < positions.length; i += 3) { float x = positions[i + 0]; @@ -86,7 +98,7 @@ public class PlayerTraceCache_15 { } } - public synchronized void hide(Player player) { + public void hide(Player player) { hiding = true; if (positions.length == 0 || positions.length % 3 != 0) return; for (int i = 0; i < positions.length; i += 3) { @@ -107,6 +119,7 @@ public class PlayerTraceCache_15 { } updatePoints = new float[0]; hiding = false; + instance.notifyAll(); } private static void showCorner(Player player, float x, float y, float z, Particle particle) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java index 2f6ae1f..70bea5d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java @@ -133,7 +133,6 @@ public class CommandTrace implements CommandExecutor { case "particle": case "particles": TNTTracer15.hideBlockTraces(player); - ShowManager.get(player).show(); ShowManager.get(player).setShowMode(ShowStatus.ShowMode.PARTICLE); break; default: