From 03683fc0b67d3f2264b58c2884ba3bed2121c15e Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 25 Jul 2020 21:55:23 +0200 Subject: [PATCH] Rename hide() -> hideBlockTraces() --- .../bausystem/tracer/PlayerTraceCache_15.java | 17 ++--------------- .../steamwar/bausystem/tracer/TNTTracer_15.java | 5 ++--- .../bausystem/commands/CommandTrace.java | 4 ++-- .../steamwar/bausystem/tracer/TNTTracer15.java | 2 +- 4 files changed, 7 insertions(+), 21 deletions(-) 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 1af3c95..15d6689 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/tracer/PlayerTraceCache_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/tracer/PlayerTraceCache_15.java @@ -25,11 +25,6 @@ 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}; } @@ -57,14 +52,7 @@ public class PlayerTraceCache_15 { } public void show(Player player, TNTCallbackShow.ShowMode showMode) { - if (hiding) { - try { - instance.wait(1000); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - if (hiding) return; - } + 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]; @@ -98,7 +86,7 @@ public class PlayerTraceCache_15 { } } - public void hide(Player player) { + public void hideBlockTraces(Player player) { hiding = true; if (positions.length == 0 || positions.length % 3 != 0) return; for (int i = 0; i < positions.length; i += 3) { @@ -119,7 +107,6 @@ 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_15/src/de/steamwar/bausystem/tracer/TNTTracer_15.java b/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTTracer_15.java index fd1c2e8..527822c 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTTracer_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/tracer/TNTTracer_15.java @@ -1,7 +1,6 @@ package de.steamwar.bausystem.tracer; import de.steamwar.bausystem.tracer.debugcallback.DebugCallbackActionBar; -import de.steamwar.bausystem.tracer.showcallback.TNTCallbackCacheUpdate; import de.steamwar.bausystem.tracer.showcallback.TNTCallbackShow; import de.steamwar.bausystem.tracer.updatecallback.*; import net.md_5.bungee.api.ChatMessageType; @@ -158,10 +157,10 @@ class TNTTracer_15 { return result; } - static void hide(Player p) { + static void hideBlockTraces(Player p) { PlayerTraceCache_15 tracerCache15 = playerMap.get(p); if (tracerCache15 == null) return; - tracerCache15.hide(p); + tracerCache15.hideBlockTraces(p); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java index 70bea5d..fdaa94e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java @@ -141,7 +141,7 @@ public class CommandTrace implements CommandExecutor { ShowManager.get(player).addSelection(tntID); player.sendMessage(BauSystem.PREFIX + "§aTNT-Positionen des TNT mit ID " + tntID + " angezeigt"); player.sendMessage(BauSystem.PREFIX + "§eBei zu vielen zu zeigenden Positionen wird der Block Tracer aktiviert"); - player.sendMessage(BauSystem.PREFIX + "§eBitte aktiviere animiertes Feuer in den Grafikeinstellungen"); + // player.sendMessage(BauSystem.PREFIX + "§eBitte aktiviere animiertes Feuer in den Grafikeinstellungen"); } catch (NumberFormatException e) { help15(player); } @@ -151,7 +151,7 @@ public class CommandTrace implements CommandExecutor { ShowManager.get(player).show(); player.sendMessage(BauSystem.PREFIX + "§aAlle TNT-Positionen angezeigt"); player.sendMessage(BauSystem.PREFIX + "§eBei zu vielen zu zeigenden Positionen wird der Block Tracer aktiviert"); - player.sendMessage(BauSystem.PREFIX + "§eBitte aktiviere animiertes Feuer in den Grafikeinstellungen"); + // player.sendMessage(BauSystem.PREFIX + "§eBitte aktiviere animiertes Feuer in den Grafikeinstellungen"); break; case "hide": if (args.length == 2) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TNTTracer15.java b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TNTTracer15.java index 4391181..3b7ca60 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TNTTracer15.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TNTTracer15.java @@ -302,7 +302,7 @@ public class TNTTracer15 { } public static void hideBlockTraces(Player p) { - TNTTracer_15.hide(p); + TNTTracer_15.hideBlockTraces(p); } public static void start() {