From 9d96d5a2a8e1a669923ffee53ce7d7137be02ec5 Mon Sep 17 00:00:00 2001 From: D4rkr34lm Date: Sun, 21 Apr 2024 21:57:00 +0200 Subject: [PATCH 1/2] Added alias for trace clear --- .../src/de/steamwar/bausystem/features/tracer/TraceCommand.java | 1 + 1 file changed, 1 insertion(+) 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 828ab9a0..db643190 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java @@ -134,6 +134,7 @@ public class TraceCommand extends SWCommand { BauSystem.MESSAGE.send("TRACE_MESSAGE_HIDE", player); } + @Register(value = "delete") @Register(value = "clear") public void clear(@Validator Player player) { TraceManager.instance.clear(Region.getRegion(player.getLocation())); From 5d2886c0a5df4f64b44b54d7a6181d38d7ca9f6f Mon Sep 17 00:00:00 2001 From: D4rkr34lm Date: Sun, 21 Apr 2024 22:13:27 +0200 Subject: [PATCH 2/2] Fix trace is added two times to manager --- .../bausystem/features/tracer/TraceRecordingWrapper.java | 1 - 1 file changed, 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java index 783cec84..cb9aafd9 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java @@ -53,7 +53,6 @@ public class TraceRecordingWrapper { recordList = new ArrayList<>(); trace = new Trace(region, recordList); - TraceManager.instance.add(trace); File recordsSaveFile = new File(TraceManager.tracesFolder, trace.getUuid() + ".records"); recordsOutputStream = new ObjectOutputStream(new GZIPOutputStream(new FileOutputStream(recordsSaveFile))); }