From 295eb82fe918790d90b5355165522ed7a6fe0157 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 21 Apr 2024 14:29:26 +0200 Subject: [PATCH] Add TraceCommand.share --- BauSystem_Main/src/BauSystem.properties | 6 +++++- BauSystem_Main/src/BauSystem_de.properties | 4 ++++ .../steamwar/bausystem/features/tracer/TraceCommand.java | 9 +++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 6b52862b..6fc4c270 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -490,6 +490,7 @@ 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_MESSAGE_SHARE=§e{0} shared his trace show state. Click to view. TRACE_COMMAND_HELP_START = §8/§etrace start §8- §7Starts recording of all TNT-positions TRACE_COMMAND_HELP_STOP = §8/§etrace stop §8- §7Stops the TNT-Tracer @@ -503,7 +504,10 @@ TRACE_COMMAND_HELP_SHOW_FROM_TO=§8/§etrace show §7from §8<§eFROM§8> §7to TRACE_COMMAND_HELP_SHOW_FROM_TO_WITH=§8/§etrace show §7from §8<§eFROM§8> §7to §8<§eTO§8> §7with §8<§eParameter§8> - §7Shows all Trace Positions from §8<§eFROM§8> to §8<§eTO§8> TRACE_COMMAND_HELP_HIDE = §8/§etrace hide §8- §7Hides all TNT-positions TRACE_COMMAND_HELP_DELETE=§8/§etrace delete §8[§eTrace§8] §8- §7Deletes all TNT-positions or a Trace -TRACE_COMMAND_HELP_ISOLATE=§8/§etrace isolate §8[§eTrace§8] §8[§eTNT§8] §8- §7Isolates specific TNTs from the Trace +TRACE_COMMAND_HELP_ISOLATE=§8/§etrace isolate §8[§eTrace§8] §8[§eTNT§8] §8- §7Isolates specific TNTs from the Trace +TRACE_COMMAND_HELP_SHARE=§8/§etrace share §8- §7Share your current Trace show state with others +TRACE_COMMAND_HELP_FOLLOW=§8/§etrace follow §8[§ePlayer§8] §8- §7Follow a players Trace show state +TRACE_COMMAND_HELP_UNFOLLOW=§8/§etrace unfollow §8- §7Unfollow the Trace show state TRACE_GUI_ITEM_NAME = §eTracer TRACE_GUI_ITEM_LORE = §7Status§8: {0} diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index 0c33a977..b89cc5f4 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -467,6 +467,7 @@ 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_MESSAGE_SHARE=§e{0} teilte seinen Trace-Show-Status. Zum Ansehen klicken. TRACE_COMMAND_HELP_START = §8/§etrace start §8- §7Startet die Aufnahme aller TNT-Positionen TRACE_COMMAND_HELP_SINGLE = §8/§etrace single §8- §7Startet eine einzelne Aufnahme aller TNT-Positionen @@ -479,6 +480,9 @@ TRACE_COMMAND_HELP_SHOW_FROM = §8/§etrace show §8(§etime§8|§7fuse§8) §7f TRACE_COMMAND_HELP_SHOW_FROM_TO = §8/§etrace show §8(§etime§8|§7fuse§8) §7from §8<§eFROM§8> §7to §8<§eTO§8> - §7Zeigt alle TNT-Positionen zwischen §8<§eFROM§8> und §8<§eTO§8> TRACE_COMMAND_HELP_HIDE = §8/§etrace hide §8- §7Versteckt alle TNT-Positionen TRACE_COMMAND_HELP_DELETE = §8/§etrace delete §8- §7Löscht alle TNT-Positionen +TRACE_COMMAND_HELP_SHARE=§8/§etrace share §8- §7Teilt den aktuellen Trace-Show-Status mit anderen +TRACE_COMMAND_HELP_FOLLOW=§8/§etrace follow §8[§ePlayer§8] §8- §7Verfolgen eines Spielers Status anzeigen +TRACE_COMMAND_HELP_UNFOLLOW=§8/§etrace unfollow §8- §7Den Status der Trace-Anzeige aufheben TRACE_GUI_ITEM_NAME = §eTracer TRACE_GUI_ITEM_LORE = §7Status§8: {0} 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 afd10cc7..7aec03b2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java @@ -29,6 +29,7 @@ import de.steamwar.command.PreviousArguments; import de.steamwar.command.SWCommand; import de.steamwar.command.TypeMapper; import de.steamwar.linkage.Linked; +import net.md_5.bungee.api.chat.ClickEvent; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -148,12 +149,12 @@ public class TraceCommand extends SWCommand { // TODO: Add Message! } - @Register(value = "share", description = "TRACE_COMMAND_HELP_SHOW") + @Register(value = "share", description = "TRACE_COMMAND_HELP_SHARE") public void share(@Validator Player player) { - // TODO Rücksprache + BauSystem.MESSAGE.broadcast("TRACE_MESSAGE_SHARE", null, new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/trace follow " + player.getName()), player.getName()); } - @Register(value = "follow", description = "TRACE_COMMAND_HELP_SHOW") + @Register(value = "follow", description = "TRACE_COMMAND_HELP_FOLLOW") public void follow(@Validator Player player, Player toFollow) { if (player == toFollow) { // TODO: Implement message @@ -163,7 +164,7 @@ public class TraceCommand extends SWCommand { // TODO: Implement message } - @Register(value = "unfollow", description = "TRACE_COMMAND_HELP_SHOW") + @Register(value = "unfollow", description = "TRACE_COMMAND_HELP_UNFOLLOW") public void unfollow(@Validator Player player) { TraceManager.instance.unfollow(player); // TODO: Implement message