From 4e6755033aa47071ef77e58bff4a0b21f16932ef Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 18 Apr 2024 17:08:39 +0200 Subject: [PATCH] Fix some stuff --- BauSystem_Main/src/BauSystem.properties | 6 +++--- BauSystem_Main/src/BauSystem_de.properties | 6 +++--- .../de/steamwar/bausystem/features/tracer/TraceCommand.java | 6 +++--- .../bausystem/features/tracer/TraceRecordingWrapper.java | 6 ++---- .../features/tracer/rendering/PlayerTraceShowData.java | 4 ---- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 7579ca7c..e7512036 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -488,9 +488,9 @@ TRACE_MESSAGE_DELETE = §cAll TNT-positions deleted TRACE_MESSAGE_DELETE_SPECIFIC=§cTrace TNT-positions deleted TRACE_MESSAGE_SHOW = §aAll TNT-positions shown TRACE_MESSAGE_HIDE = §cAll TNT-positions hidden -TRACE_MESSAGE_SHOW_AT=§aTNT-positions shown at {1} -TRACE_MESSAGE_SHOW_FROM=§aAll TNT-positions shown from {1} -TRACE_MESSAGE_SHOW_FROM_TO=§aAll TNT-positions shown from {1} to {2} +TRACE_MESSAGE_SHOW_AT=§aTNT-positions shown at {0} +TRACE_MESSAGE_SHOW_FROM=§aAll TNT-positions shown from {0} +TRACE_MESSAGE_SHOW_FROM_TO=§aAll TNT-positions shown from {0} to {1} TRACE_MESSAGE_SHOW_TO_SMALLER = §cTo must be bigger then from TRACE_COMMAND_HELP_START = §8/§etrace start §8- §7Starts recording of all TNT-positions diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index 965db404..466f26c6 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -466,9 +466,9 @@ TRACE_MESSAGE_DELETE = §cAlle TNT-Positionen gelöscht TRACE_MESSAGE_SHOW = §aAlle TNT-Positionen angezeigt TRACE_MESSAGE_HIDE = §cAlle TNT-Positionen ausgeblendet TRACE_MESSAGE_DISALLOWED = §cDu darfst hier nicht den TNT-Tracer nutzen -TRACE_MESSAGE_SHOW_AT = §aTNT-positions angezeigt mit {0} bei {1} -TRACE_MESSAGE_SHOW_FROM = §aAll TNT-positions angezeigt mit {0} von {1} -TRACE_MESSAGE_SHOW_FROM_TO = §aAll TNT-positions angezeigt mit {0} von {1} bis {2} +TRACE_MESSAGE_SHOW_AT=§aTNT-positions angezeigt bei {0} +TRACE_MESSAGE_SHOW_FROM=§aAll TNT-positions angezeigt von {0} +TRACE_MESSAGE_SHOW_FROM_TO=§aAll TNT-positions angezeigt von {0} bis {1} TRACE_MESSAGE_SHOW_TO_SMALLER = §cBis muss größer als von sein TRACE_COMMAND_HELP_START = §8/§etrace start §8- §7Startet die Aufnahme aller TNT-Positionen 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 35c1eed4..3255deca 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java @@ -73,19 +73,19 @@ public class TraceCommand extends SWCommand { } @Register(value = {"show", "at"}, description = "TRACE_COMMAND_HELP_SHOW_AT_WITH") - public void showAt(@Validator Player player, @Min(intValue = 0) int time, @StaticValue("with") String with, @OptionalValue("STRICT") BundleFilter bundleFilter, @ArrayLength(min = 1) ViewFlag... flags) { + public void showAt(@Validator Player player, @Min(intValue = 0) int time, @StaticValue("with") String with, @OptionalValue("STRICT") BundleFilter bundleFilter, ViewFlag... flags) { showInternal(player, time, time, bundleFilter, flags); BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW_AT", player, time); } @Register(value = {"show", "from"}, description = "TRACE_COMMAND_HELP_SHOW_FROM_WITH") - public void showFromTo(@Validator Player player, @Min(intValue = 0) int from, @StaticValue("with") String with, @OptionalValue("STRICT") BundleFilter bundleFilter, @ArrayLength(min = 1) ViewFlag... flags) { + public void showFromTo(@Validator Player player, @Min(intValue = 0) int from, @StaticValue("with") String with, @OptionalValue("STRICT") BundleFilter bundleFilter, ViewFlag... flags) { showInternal(player, from, Integer.MAX_VALUE, bundleFilter, flags); BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW_FROM", player, from); } @Register(value = {"show", "from"}, description = "TRACE_COMMAND_HELP_SHOW_FROM_TO_WITH") - public void showFromTo(@Validator Player player, @Min(intValue = 0) int from, @StaticValue("to") String toString, int to, @StaticValue("with") String with, @OptionalValue("STRICT") BundleFilter bundleFilter, @ArrayLength(min = 1) ViewFlag... flags) { + public void showFromTo(@Validator Player player, @Min(intValue = 0) int from, @StaticValue("to") String toString, int to, @StaticValue("with") String with, @OptionalValue("STRICT") BundleFilter bundleFilter, ViewFlag... flags) { if (to < from) { BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW_TO_SMALLER", player); return; 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 6cdc97ed..c68a3a75 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceRecordingWrapper.java @@ -34,7 +34,7 @@ import java.util.zip.GZIPOutputStream; //TODO Rename ? public class TraceRecordingWrapper { - + @Getter private final long startTick; private final List recordsToAdd; @@ -85,11 +85,9 @@ public class TraceRecordingWrapper { recordList.addAll(recordsToAdd); recordsToAdd.clear(); - - System.out.println(recordList); } - @SneakyThrows // TODO: Why is this not called? + @SneakyThrows protected void finalizeRecording() { recordsOutputStream.flush(); recordsOutputStream.close(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/PlayerTraceShowData.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/PlayerTraceShowData.java index 0e4320fb..aedfba16 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/PlayerTraceShowData.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/rendering/PlayerTraceShowData.java @@ -49,8 +49,6 @@ public class PlayerTraceShowData { } } - System.out.println(flagList); - // Manage inverse flags ViewFlag.inverseFlags.forEach(viewFlag -> { if (!flagList.remove(viewFlag)) { @@ -58,8 +56,6 @@ public class PlayerTraceShowData { } }); - System.out.println(flagList); - return flagList; }