SteamWar/BauSystem2.0
Archiviert
12
0

Trace Refactor #233

Zusammengeführt
YoyoNow hat 121 Commits von TracerGUI nach master 2024-04-21 16:03:26 +02:00 zusammengeführt
3 geänderte Dateien mit 7 neuen und 8 gelöschten Zeilen
Nur Änderungen aus Commit 5af9cfcaad werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -481,7 +481,6 @@ TRACE_RECORD=§aon
TRACE_HAS_TRACES=§ehas Traces
TRACE_IDLE_SINGLE=§esingle
TRACE_IDLE_AUTO_IGNITE=§eauto
TRACE_MESSAGE_AUTO_IDLE_IGNITE = §aAuto-Tracer ignite started
TRACE_MESSAGE_START = §aTNT-Tracer started
TRACE_MESSAGE_STOP = §cTNT-Tracer stopped
TRACE_MESSAGE_DELETE = §cAll TNT-positions deleted

Datei anzeigen

@ -67,25 +67,25 @@ public class TraceCommand extends SWCommand {
}
@Register(value = "show", description = "TRACE_COMMAND_HELP_SHOW")
public void show(@Validator Player player, @OptionalValue("STRICT") BundleFilter bundleFilter, ViewFlag... flags) {
public void show(@Validator Player player, @OptionalValue("DEFAULT") BundleFilter bundleFilter, ViewFlag... flags) {
showInternal(player, bundleFilter, flags);
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW", player);
}
@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, ViewFlag... flags) {
public void showAt(@Validator Player player, @Min(intValue = 0) int time, @StaticValue("with") String with, @OptionalValue("DEFAULT") 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, ViewFlag... flags) {
public void showFromTo(@Validator Player player, @Min(intValue = 0) int from, @StaticValue("with") String with, @OptionalValue("DEFAULT") 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, ViewFlag... flags) {
public void showFromTo(@Validator Player player, @Min(intValue = 0) int from, @StaticValue("to") String toString, int to, @StaticValue("with") String with, @OptionalValue("DEFAULT") BundleFilter bundleFilter, ViewFlag... flags) {
if (to < from) {
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW_TO_SMALLER", player);
return;
@ -133,10 +133,10 @@ public class TraceCommand extends SWCommand {
@Register(value = "clear")
public void clear(@Validator Player player) {
TraceManager.instance.clear(Region.getRegion(player.getLocation()));
BauSystem.MESSAGE.send("TRACE_MESSAGE_CLEAR", player);
BauSystem.MESSAGE.send("TRACE_MESSAGE_DELETE", player);
}
@Register(value = "delete", description = "TRACE_MESSAGE_DELETE")
@Register(value = "delete", description = "TRACE_COMMAND_HELP_DELETE")
public void delete(@Validator Player player, Trace trace) {
TraceManager.instance.remove(trace);
BauSystem.MESSAGE.send("TRACE_MESSAGE_DELETE_SPECIFIC", player);

Datei anzeigen

@ -217,7 +217,7 @@ public class TraceManager implements Listener {
Region region = Region.getRegion(player.getLocation());
PlayerTraceShowData previous = showDataPerRegionPerPlayer.getOrDefault(region, Collections.emptyMap()).remove(player);
if (previous == null) return;
tracesByRegion.getOrDefault(player, Collections.emptyMap()).forEach((integer, trace) -> {
tracesByRegion.getOrDefault(region, Collections.emptyMap()).forEach((integer, trace) -> {
trace.hide(player);
followerMap.getOrDefault(player, Collections.emptySet()).forEach(trace::hide);
});