From 5ec9fbb6e0cfc9470fd224f64dad005a9c962816 Mon Sep 17 00:00:00 2001 From: D4rkr34lm Date: Mon, 18 Mar 2024 22:40:41 +0100 Subject: [PATCH] Fixed Trace id assignment Fixed trace recording of source tnt --- .../src/de/steamwar/bausystem/features/tracer/Recorder.java | 1 + .../src/de/steamwar/bausystem/features/tracer/TraceCommand.java | 2 -- .../src/de/steamwar/bausystem/features/tracer/TraceManager.java | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Recorder.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Recorder.java index 30ff7d73..cbc6c444 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Recorder.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/Recorder.java @@ -192,6 +192,7 @@ public class Recorder implements Listener { trackedTNT.get(region).add((TNTPrimed) event.getEntity()); tntSpawnRegion.put((TNTPrimed) event.getEntity(), region); + record((TNTPrimed) event.getEntity(), activeTraces.get(region), Collections.emptyList()); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java index fcbb6665..51a63461 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java @@ -81,14 +81,12 @@ public class TraceCommand extends SWCommand { @Register(value = "delete", description = "TRACE_COMMAND_HELP_SHOW") public void delete(Player player){ manager.clear(); - //BauSystem.MESSAGE.send("TRACE_MESSAGE_DELETE_ALL", player); } //TODO Manage non exsistent trace @Register(value = "delete", description = "TRACE_COMMAND_HELP_SHOW") public void delete(Player player, int id){ manager.remove(id); - //BauSystem.MESSAGE.send("TRACE_MESSAGE_DELETE", player); } @ClassMapper(value = BundleFilter.class, local = true) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java index 786fe8e5..ccd89e1c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceManager.java @@ -63,7 +63,7 @@ public class TraceManager implements Listener { trace.render(player, viewFlagMap.get(player), bundleFilterMap.get(player)); traces.put(nextOpenId, trace); nextOpenId++; - return nextOpenId--; + return nextOpenId; } /** Removes the trace with the given id