diff --git a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java index 61d62c6..22eb928 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/commands/CommandTrace.java @@ -189,6 +189,7 @@ public class CommandTrace implements CommandExecutor { try { int tntID = Integer.parseInt(args[1]); ShowManager.removeTrace(tntID); + TNTTracer15.remove(tntID); player.sendMessage(BauSystem.PREFIX + "§cTNT-Positionen mit ID " + tntID + " gelöscht"); } catch (NumberFormatException e) { help15(player); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TNTTracer15.java b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TNTTracer15.java index 25ea48c..2d49dba 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/tracer/TNTTracer15.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/tracer/TNTTracer15.java @@ -284,6 +284,13 @@ public class TNTTracer15 { ShowManager.removeAllTraces(); } + public static void remove(int tntID) { + Iterator frameIterator = tntFrames.iterator(); + while (frameIterator.hasNext()) { + frameIterator.next().remove(tntID); + } + } + public static void hideBlockTraces(Player p) { TNTTracer_15.hide(p); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/tracer/trace/TNTFrame.java b/BauSystem_Main/src/de/steamwar/bausystem/tracer/trace/TNTFrame.java index 5ac1abd..ca9364b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/tracer/trace/TNTFrame.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/tracer/trace/TNTFrame.java @@ -59,6 +59,10 @@ public class TNTFrame { } } + public void remove(int tntID) { + positions.remove(tntID); + } + public LinkedList getTraces(LinkedList selection) { LinkedList traces = new LinkedList<>(); Iterator iterator = selection.iterator();