From 5db4f96b34c6edac914c02e5aa0ef4734b23e162 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 24 Nov 2021 17:00:22 +0100 Subject: [PATCH] Update more things to multiling Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 83 +++++++++++-------- .../observer/ObserverTracerCommand.java | 16 ++-- .../features/other/ClearCommand.java | 11 +-- .../features/other/DeclutterCommand.java | 8 +- .../features/other/KillAllCommand.java | 12 +-- .../bausystem/features/other/SlotCommand.java | 10 +-- .../features/other/TeleportCommand.java | 10 +-- .../bausystem/features/other/TimeCommand.java | 7 +- .../bausystem/features/other/TpsCommand.java | 19 +++-- .../features/other/WorldSpawnCommand.java | 9 +- .../redstonetester/RedstonetesterCommand.java | 8 +- .../features/region/ColorCommand.java | 12 +-- .../features/region/DamageCommand.java | 8 +- .../features/region/FireCommand.java | 8 +- .../features/region/FreezeCommand.java | 8 +- .../features/region/ProtectCommand.java | 8 +- .../features/region/RegionCommand.java | 62 +++++++------- .../features/region/ResetCommand.java | 11 +-- .../bausystem/features/region/TNTCommand.java | 8 +- .../features/region/TestblockCommand.java | 15 +--- .../features/script/ScriptCommand.java | 11 +-- .../features/script/ScriptVarsCommand.java | 22 ++--- .../features/script/UnsignCommand.java | 9 +- 23 files changed, 135 insertions(+), 240 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 00030697..0e4ad6c3 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -373,8 +373,8 @@ SCRIPT_MENU_GUI_UNKNOWN_EVENT = §cEvent '{0}' ist nicht definierbar SCRIPT_MENU_GUI_LIMIT = §cScript-Buch Limit erreicht ## ScriptCommand -SCRIPT_COMMAND_HELP_1 = §8/§escript §8- §7Öffnet die ScriptGUI -SCRIPT_COMMAND_HELP_2 = §8/§escript menu §8- §7Öffnet die ScriptMenuGUI für Custom Command b auübergreifend +SCRIPT_COMMAND_HELP = §8/§escript §8- §7Öffnet die ScriptGUI +SCRIPT_COMMAND_HELP_MENU = §8/§escript menu §8- §7Öffnet die ScriptMenuGUI für Custom Command b auübergreifend ## Script GUI SCRIPT_GUI_NAME = Script Elements @@ -480,10 +480,10 @@ SCRIPT_GUI_CONSTANT_REGION_TYPE_NAME = §7Constant §eregion-type SCRIPT_GUI_CONSTANT_REGION_TYPE_LORE = §eRegionstype§7 der jetztigen Region ## Script Vars -SCRIPT_COMMAND_VARS_HELP_1 = §8/§escriptvars §8- §7Zähle alle globalen Variablen auf -SCRIPT_COMMAND_VARS_HELP_2 = §8/§escriptvars §8[§7Variable§8] §8- §7Gebe den Wert der Variable zurück -SCRIPT_COMMAND_VARS_HELP_3 = §8/§escriptvars §8[§7Variable§8] §8[§7Value§8] §8- §7Setzte eine Variable auf einen Wert -SCRIPT_COMMAND_VARS_HELP_4 = §8/§escriptvars §8[§7Variable§8] §8<§7remove§8|§7delete§8|§7clear§8> §8- §7Lösche eine Variable +SCRIPT_COMMAND_VARS_HELP = §8/§escriptvars §8- §7Zähle alle globalen Variablen auf +SCRIPT_COMMAND_VARS_HELP_VAR = §8/§escriptvars §8[§7Variable§8] §8- §7Gebe den Wert der Variable zurück +SCRIPT_COMMAND_VARS_HELP_SET = §8/§escriptvars §8[§7Variable§8] §8[§7Value§8] §8- §7Setzte eine Variable auf einen Wert +SCRIPT_COMMAND_VARS_HELP_DELETE = §8/§escriptvars §8[§7Variable§8] §8<§7remove§8|§7delete§8|§7clear§8> §8- §7Lösche eine Variable SCRIPT_COMMAND_VARS_NO_VARS = §cKeine globalen Variablen definiert SCRIPT_COMMAND_VARS_ONE_VAR = eine Variable @@ -652,6 +652,10 @@ LOADTIMER_SUMARY_STATS_FREQ=§7Belade Frequenz: §e{0}/m§8, §7Schuss Frequenz: # Observer OBSERVER_HELP = §7Rechts-Klicke einen Observer um den Trace zu bekommen. Hierfür müssen Flammenpartikel an sein. Die Partikel werden im Block angezeigt. +OBSERVER_HELP_ENABLE = §8/§eobserver enable §8-§7 Aktiviere den Observer Tracer +OBSERVER_HELP_DISABLE = §8/§eobserver disable §8-§7 Deaktiviere den Observer Tracer +OBSERVER_HELP_DELETE = §8/§eobserver delete §8-§7 Lösche den Observer Tracer +OBSERVER_HELP_RETRACE = §8/§eobserver retrace §8-§7 Retrace den Observer Tracer OBSERVER_ENABLE = §7Observer Trace gestartet OBSERVER_DISABLE = §7Observer Trace gestoppt OBSERVER_DELETE = §7Observer Trace gelöscht @@ -664,30 +668,36 @@ OTHER_ITEMS_TELEPORT_GUI-NAME=Teleportieren OTHER_ITEMS_TELEPORT_PLAYER-OFFLINE=§cDer Spieler ist Offline OTHER_SLOT_INVALID_SLOT=§cInvalider Slot OTHER_NOCLIP_SLOT_INFO=§7Mit /slot kannst du den ausgewählten Slot ändern und einen anderen Block in den Slot nehmen. -OTHER_CLEAR_HELP_1=§8/§eclear §8- §7Leere dein Inventar -OTHER_CLEAR_HELP_2=§8/§ebau clear §8[§7Player§8] §8- §7Leere ein Spieler Inventar +OTHER_NOCLIP_SLOT_HELP_PICK = §8/§eslot pick §8-§7 Lege den angeguckten Block ins Inventar +OTHER_NOCLIP_SLOT_HELP_DROP = §8/§eslot drop §8-§7 Cleared deinen Slot +OTHER_CLEAR_HELP_SELF=§8/§eclear §8- §7Leere dein Inventar +OTHER_CLEAR_HELP_PLAYER=§8/§ebau clear §8[§7Player§8] §8- §7Leere ein Spieler Inventar OTHER_CLEAR_CLEARED=Dein Inventar wurde geleert. OTHER_CLEAR_FROM=Dein Inventar wurde von {0} §7geleert. OTHER_CLEAR_TO=Das Inventar von {0} §7wurde geleert. OTHER_CLEAR_NO_PERMS=§cDu darfst hier keine fremden Inventare leeren. -OTHER_DECLUTTER_HELP_1=§8/§edeclutter §8- §7Räume dein Inventar auf +OTHER_DECLUTTER_HELP=§8/§edeclutter §8- §7Räume dein Inventar auf OTHER_DECLUTTER_DONE=§aDein Inventar wurde aufgeräumt. OTHER_GAMEMODE_UNKNOWN=§cUnbekannter Spielmodus. OTHER_GAMEMODE_POSSIBLE=§cMögliche Spielmodi: survival, adventure, creative, specator. -OTHER_KILLALL_HELP_1=§8/§ekillall §8- §7Entferne alle Entities aus deiner Region -OTHER_KILLALL_HELP_2=§8/§ekillall §8[§7Global§8/Local§7] §8- §7Entferne alle Entities aus deiner Region oder global +OTHER_KILLALL_HELP_SELF=§8/§ekillall §8- §7Entferne alle Entities aus deiner Region +OTHER_KILLALL_HELP_ALL=§8/§ekillall §8[§7Global§8/Local§7] §8- §7Entferne alle Entities aus deiner Region oder global OTHER_KILLALL_REGION=§a{0} Entities aus der Region entfernt OTHER_KILLALL_GLOBAL=§a{0} Entities aus der Global entfernt +OTHER_TELEPORT_HELP = §8/§etp §8[§8Player§8] §8-§7 Teleportiere dich zu einem Spieler OTHER_TELEPORT_SELF_0=§cSei eins mit dir selbst! OTHER_TELEPORT_SELF_1=§cDu brauchst Leute zum spielen? Wir haben auch einen TeamSpeak! OTHER_TELEPORT_SELF_2=§cNoch zu reisende Blöcke: 0; ETA: 0:00 OTHER_TELEPORT_SELF_3=§cEin wenig bewegung muss ein. OTHER_TELEPORT_SELF_4=§cFür eine solche Distanz? -OTHER_TIME_HELP_1=§8/§etime §8<§7Zeit 0=Morgen§8, §76000=Mittag§8, §718000=Mitternacht§8> - §7Setzt die Zeit auf dem Bau +OTHER_TIME_HELP=§8/§etime §8<§7Zeit 0=Morgen§8, §76000=Mittag§8, §718000=Mitternacht§8> - §7Setzt die Zeit auf dem Bau OTHER_TIME_NO_PERM=§cDu darfst hier nicht die Zeit ändern OTHER_TIME_INVALID=§cBitte gib eine Zahl zwischen 0 und 24000 an OTHER_TIME_RESULT=§7§oWhooosh -OTHER_WORLDSPAWN_HELP_1=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn +OTHER_TPS_HEAD = §7TPS: 1s 10s 1m 5m 10m +OTHER_TPS_MESSAGE = §7 §e{0}§7 §e{1}§7 §e{2}§7 §e{3}§7 §e{4} +OTHER_TPS_SINGLE = §8TPS: §e{0} +OTHER_WORLDSPAWN_HELP=§8/§eworldspawn §8-§e Teleportiere dich zum Spawn # DebugStick DEBUG-STICK_COMMAND_HELP=§8/§edebugstick §8-§7 Erhalte einen DebugStick # StructureVoid @@ -727,7 +737,7 @@ MATERIAL_FLAMMABLE=§8- §eFlammbarer Block MATERIAL_BURNABLE=§8- §eBrennbarer Block MATERIAL_WATERLOGGABLE=§8- §eWasserspeicherbarer Block # Redstonetester -RT_HELP_1=§8/§eredstonetester §8-§7 Gibt den RedstoneTester +RT_HELP=§8/§eredstonetester §8-§7 Gibt den RedstoneTester RT_GIVEN=§7Messe die Zeit zwischen der Aktivierung zweier Redstone Komponenten RT_ITEM_NAME=§eRedstonetester RT_ITEM_LORE_1=§eLinksklick Block §8-§7 Setzt die 1. Position @@ -757,36 +767,39 @@ REGION_ITEM_SELECTOR_ON=§eEinschalten REGION_ITEM_SELECTOR_ONLY_TB=§enur Testblock REGION_ITEM_SELECTOR_OFF=§eAusschalten #Region -REGION_COLOR_HELP_1=§8/§ecolor §8[§7Color§8] §8- §7Setze die Farbe der Region -REGION_COLOR_HELP_2=§8/§ecolor §8[§7Color§8] §8[§7Type§8] §8- §7Setze die Farbe der Region oder Global +REGION_COLOR_HELP_COLOR=§8/§ecolor §8[§7Color§8] §8- §7Setze die Farbe der Region +REGION_COLOR_HELP_COLOR_TYPE=§8/§ecolor §8[§7Color§8] §8[§7Type§8] §8- §7Setze die Farbe der Region oder Global REGION_COLOR_GLOBAL=§7Alle Regions farben auf §e{0}§7 gesetzt REGION_COLOR_NO_REGION=§cDu befindest dich derzeit in keiner Region REGION_COLOR_NO_PERMS=§cDies ist nicht deine Welt! -REGION_DAMAGE_HELP_1=§8/§edamage §8- §7Toggle Spielerschaden +REGION_DAMAGE_HELP=§8/§edamage §8- §7Toggle Spielerschaden REGION_DAMAGE_NO_PERMS=§cDu darfst hier nicht Spielerschaden (de-)aktivieren REGION_DAMAGE_ENABLED=§cRegions Spielerschaden deaktiviert REGION_DAMAGE_DISABLED=§aRegions Spielerschaden aktiviert -REGION_FIRE_HELP_1=§8/§efire §8- §7Toggle Feuerschaden +REGION_FIRE_HELP=§8/§efire §8- §7Toggle Feuerschaden REGION_FIRE_NO_PERMS=§cDu darfst hier nicht Feuerschaden (de-)aktivieren REGION_FIRE_ENABLED=§cRegions Feuerschaden deaktiviert REGION_FIRE_DISABLED=§aRegions Feuerschaden aktiviert -REGION_FREEZE_HELP_1=§8/§efreeze §8- §7Toggle Freeze +REGION_FREEZE_HELP=§8/§efreeze §8- §7Toggle Freeze REGION_FREEZE_NO_PERMS=§cDu darfst diese Welt nicht einfrieren REGION_FREEZE_ENABLED=§cRegion eingefroren REGION_FREEZE_DISABLED=§aRegion aufgetaut -REGION_PROTECT_HELP_1=§8/§eprotect §8- §7Schütze die Region +REGION_PROTECT_HELP=§8/§eprotect §8- §7Schütze die Region REGION_PROTECT_DISABLE=§cBoden Schutz aufgehoben REGION_PROTECT_ENABLE=§aBoden geschützt REGION_PROTECT_NO_PERMS=§cDu darfst hier nicht den Boden schützen REGION_PROTECT_FALSE_REGION=§cDu befindest dich derzeit in keiner (M)WG-Region -REGION_REGION_HELP_1=§8/§eregion undo §8- §7Mache die letzten 20 /testblock oder /reset rückgängig -REGION_REGION_HELP_2=§8/§eregion redo §8- §7Wiederhole die letzten 20 §8/§7rg undo -REGION_REGION_HELP_3=§8/§eregion restore §8- §7Setzte die Region zurück, ohne das Gebaute zu löschen -REGION_REGION_HELP_4=§8/§eregion §8[§7RegionsTyp§8] §8- §7Wähle einen RegionsTyp aus -REGION_REGION_HELP_5=§8/§eregion §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Wähle einen RegionsTyp aus mit oder ohne Extension -REGION_REGION_HELP_6=§8/§eregion color §8[§7Color§8] §8- §7Ändere die Regions Farbe -REGION_REGION_HELP_7=§8/§eregion copypoint §8- §7Teleportiere dich zum Regions Kopierpunkt -REGION_REGION_HELP_8=§8/§eregion testblockpoint §8- §7Teleportiere dich zum Regions Testblockpunkt +REGION_REGION_HELP_UNDO=§8/§eregion undo §8- §7Mache die letzten 20 /testblock oder /reset rückgängig +REGION_REGION_HELP_REDO=§8/§eregion redo §8- §7Wiederhole die letzten 20 §8/§7rg undo +REGION_REGION_HELP_RESTORE=§8/§eregion restore §8- §7Setzte die Region zurück, ohne das Gebaute zu löschen +REGION_REGION_HELP_RESTORE_SCHEMATIC=§8/§eregion restore §8[§7Schematic§8] §8- §7Setzte die Region zurück, ohne das Gebaute zu löschen +REGION_REGION_HELP_SELECT=§8/§eregion §8[§7RegionsTyp§8] §8- §7Wähle einen RegionsTyp aus +REGION_REGION_HELP_SELECT_EXTENSION=§8/§eregion §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Wähle einen RegionsTyp aus mit oder ohne Extension +REGION_REGION_HELP_COLOR=§8/§eregion color §8[§7Color§8] §8- §7Ändere die Regions Farbe +REGION_REGION_HELP_COPYPOINT=§8/§eregion copypoint §8- §7Teleportiere dich zum Regions Kopierpunkt +REGION_REGION_HELP_TESTBLOCKPOINT=§8/§eregion testblockpoint §8- §7Teleportiere dich zum Regions Testblockpunkt +REGION_REGION_HELP_CHANGETYPE_INFO=§8/§eregion changetype §8- §7Gebe den Regions Type aus +REGION_REGION_HELP_CHANGETYPE=§8/§eregion changetype §8[§7Type§8] §8- §8Setzte den Regions Type REGION_REGION_NOTHING_UNDO=§cNichts zum rückgängig machen REGION_REGION_UNDID=§7Letzte Aktion rückgangig gemacht REGION_REGION_NOTHING_REDO=§cNichts zum wiederhohlen @@ -808,22 +821,24 @@ REGION_REGION_CHANGETYPE_INVALID=§cRegions Type ist nicht erlaubt hier REGION_REGION_CHANGETYPE_CHANGE=§7Regions Type ist auf §e{0}§7 geändert REGION_REGION_CHANGETYPE_CHANGE_UPDATE=§7Klicke §e§lHIER §7um den Type anzuwenden REGION_REGION_CHANGETYPE_CHANGE_UPDATE_HOVER=§8/§ereset -REGION_RESET_HELP_1=§8/§ereset §8- §7Setzte die Region zurück -REGION_RESET_HELP_2=§8/§ereset §8[§7Schematic§8] §8- §7Setzte die Region mit einer Schematic zurück +REGION_RESET_HELP_RESET=§8/§ereset §8- §7Setzte die Region zurück +REGION_RESET_HELP_SCHEMATIC=§8/§ereset §8[§7Schematic§8] §8- §7Setzte die Region mit einer Schematic zurück REGION_RESET_RESETED=§7Region zurückgesetzt REGION_RESET_ERROR=§cFehler beim Zurücksetzen der Region REGION_RESET_NO_SCHEM=§cSchematic nicht gefunden REGION_RESET_NO_PERMS=§cDu darfst hier nicht die Region zurücksetzen REGION_RESET_NO_REGION=§cDu befindest dich derzeit in keiner Region -REGION_TB_HELP_1=§8/§etestblock §8- §7Setzte den Testblock zurück -REGION_TB_HELP_2=§8/§etestblock §8[§7Schematic§8] §8- §7Setzte den Testblock mit einer Schematic zurück +REGION_TB_HELP_RESET=§8/§etestblock §8- §7Setzte den Testblock zurück +REGION_TB_HELP_RESET_EXTENSION=§8/§etestblock §8[§7ExtensionType§8] §8- §7Setzte den Testblock zurück +REGION_TB_HELP_SCHEMATIC=§8/§etestblock §8[§7Schematic§8] §8- §7Setzte den Testblock mit einer Schematic zurück +REGION_TB_HELP_SCHEMATIC_EXTENSION=§8/§etestblock §8[§7Schematic§8] §8[§7ExtensionType§8] §8- §7Setzte den Testblock mit einer Schematic zurück REGION_TB_DONE=§7Testblock zurückgesetzt REGION_TB_ERROR=§cFehler beim Zurücksetzen des Testblocks REGION_TB_NO_SCHEM=§cSchematic nicht gefunden REGION_TB_NO_PERMS=§cDu darfst hier nicht den Testblock zurücksetzen REGION_TB_NO_REGION=§cDu befindest dich derzeit in keiner Region -REGION_TNT_HELP_1=§8/§etnt §8- §7Ändere das TNT verhalten -REGION_TNT_HELP_2=§8/§etnt §8[§7Mode§8] §8- §7Setzte das TNT verhalten auf einen Modus +REGION_TNT_HELP=§8/§etnt §8- §7Ändere das TNT verhalten +REGION_TNT_HELP_MODE=§8/§etnt §8[§7Mode§8] §8- §7Setzte das TNT verhalten auf einen Modus REGION_TNT_ON=§aTNT-Schaden aktiviert REGION_TNT_OFF=§cTNT-Schaden deaktiviert REGION_TNT_TB=§aTNT-Schaden außerhalb Baurahmen aktiviert diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java index ed9d422b..cdd95026 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerCommand.java @@ -30,34 +30,29 @@ public class ObserverTracerCommand extends SWCommand { public ObserverTracerCommand() { super("observertracer", "observer"); + addDefaultHelpMessage("OBSERVER_HELP"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Observer Tracer"); - BauSystem.MESSAGE.sendPrefixless("OBSERVER_HELP", p); - } - - @Register(value = "enable") + @Register(value = "enable", description = "OBSERVER_HELP_ENABLE") public void enable(Player p) { ObserverTracerListener.enabled.add(p); BauSystem.MESSAGE.send("OBSERVER_ENABLE", p); } - @Register(value = "disable") + @Register(value = "disable", description = "OBSERVER_HELP_DISABLE") public void disable(Player p) { ObserverTracerListener.enabled.remove(p); ObserverTracerListener.observerTracerMap.remove(p); BauSystem.MESSAGE.send("OBSERVER_DISABLE", p); } - @Register(value = "delete") + @Register(value = "delete", description = "OBSERVER_HELP_DELETE") public void delete(Player p) { ObserverTracerListener.observerTracerMap.remove(p); BauSystem.MESSAGE.send("OBSERVER_DELETE", p); } - @Register(value = "retrace") + @Register(value = "retrace", description = "OBSERVER_HELP_RETRACE") public void retrace(Player p) { if (ObserverTracerListener.observerTracerMap.containsKey(p)) { BauSystem.MESSAGE.send("OBSERVER_RETRACE_NO-TRACE", p); @@ -66,5 +61,4 @@ public class ObserverTracerCommand extends SWCommand { ObserverTracerListener.observerTracerMap.get(p).trace(); BauSystem.MESSAGE.send("OBSERVER_RETRACE_DONE", p); } - } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/ClearCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/ClearCommand.java index 4f451b23..7e292237 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/ClearCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/ClearCommand.java @@ -38,20 +38,13 @@ public class ClearCommand extends SWCommand { super("clear"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Clear"); - BauSystem.MESSAGE.sendPrefixless("OTHER_CLEAR_HELP_1", p); - BauSystem.MESSAGE.sendPrefixless("OTHER_CLEAR_HELP_2", p); - } - - @Register + @Register(description = "OTHER_CLEAR_HELP_SELF") public void genericClearCommand(Player p) { clear(p); BauSystem.MESSAGE.send("OTHER_CLEAR_CLEARED", p); } - @Register + @Register(description = "OTHER_CLEAR_HELP_PLAYER") public void clearPlayerCommand(@Guard Player p, Player target) { clear(target); BauSystem.MESSAGE.send("OTHER_CLEAR_FROM", target, p.getName()); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/DeclutterCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/DeclutterCommand.java index 8f9e81db..6f79b69c 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/DeclutterCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/DeclutterCommand.java @@ -37,13 +37,7 @@ public class DeclutterCommand extends SWCommand { super("declutter", "cleanup"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Declutter"); - BauSystem.MESSAGE.sendPrefixless("OTHER_DECLUTTER_HELP_1", p); - } - - @Register + @Register(description = "OTHER_DECLUTTER_HELP") public void genericCommand(Player p) { Inventory inventory = p.getInventory(); Set containedItems = new HashSet<>(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/KillAllCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/KillAllCommand.java index 2708620d..f22b9afa 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/KillAllCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/KillAllCommand.java @@ -19,7 +19,6 @@ package de.steamwar.bausystem.features.other; -import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.bausystem.region.GlobalRegion; @@ -44,19 +43,12 @@ public class KillAllCommand extends SWCommand { super("killall", "removeall"); } - @Register(help = true) - public void genericHelp(Player player, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", player, "Killall"); - BauSystem.MESSAGE.sendPrefixless("OTHER_KILLALL_HELP_1", player); - BauSystem.MESSAGE.sendPrefixless("OTHER_KILLALL_HELP_2", player); - } - - @Register + @Register(description = "OTHER_KILLALL_HELP_SELF") public void genericCommand(Player player) { genericCommand(player, RegionSelectionType.LOCAL); } - @Register + @Register(description = "OTHER_KILLALL_HELP_ALL") public void genericCommand(Player player, RegionSelectionType regionSelectionType) { Region region = Region.getRegion(player.getLocation()); AtomicLong count = new AtomicLong(0); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/SlotCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/SlotCommand.java index 0adb7f86..0c50d8ff 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/SlotCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/SlotCommand.java @@ -38,11 +38,7 @@ public class SlotCommand extends SWCommand { protected SlotCommand() { super("slot", "s"); - } - - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.send("OTHER_NOCLIP_SLOT_INFO", p); + addDefaultHelpMessage("OTHER_NOCLIP_SLOT_INFO"); } @Register @@ -54,7 +50,7 @@ public class SlotCommand extends SWCommand { player.getInventory().setHeldItemSlot(slot - 1); } - @Register("pick") + @Register(value = "pick", description = "OTHER_NOCLIP_SLOT_HELP_PICK") public void eyedropBlock(Player player) { Block block = player.getTargetBlockExact(6); ItemStack itemStack; @@ -65,7 +61,7 @@ public class SlotCommand extends SWCommand { SWUtils.giveItemToPlayer(player, itemStack); } - @Register("drop") + @Register(value = "drop", description = "OTHER_NOCLIP_SLOT_HELP_DROP") public void dropBlock(Player player) { player.getInventory().setItemInMainHand(new ItemStack(Material.AIR)); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/TeleportCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/TeleportCommand.java index 92a988dc..40fd9aa0 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/TeleportCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/TeleportCommand.java @@ -20,7 +20,6 @@ package de.steamwar.bausystem.features.other; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.config.ColorConfig; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; @@ -38,15 +37,10 @@ public class TeleportCommand extends SWCommand { super("teleport", "tp"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "tp " + ColorConfig.OTHER + "[" + ColorConfig.BASE + "Player" + ColorConfig.OTHER + "] - " + ColorConfig.BASE + "Teleportiere dich zu einem Spieler"); - } - - @Register + @Register(description = "OTHER_TELEPORT_HELP") public void genericCommand(Player p, Player target) { if (p.getUniqueId().equals(target.getUniqueId())) { - BauSystem.MESSAGE.send("OTHER_TELEPORT_SELF_" + RAND.nextInt(4), p); + BauSystem.MESSAGE.send("OTHER_TELEPORT_SELF_" + RAND.nextInt(5), p); return; } p.teleport(target, PlayerTeleportEvent.TeleportCause.COMMAND); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/TimeCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/TimeCommand.java index 2efae3a6..27995703 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/TimeCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/TimeCommand.java @@ -37,12 +37,7 @@ public class TimeCommand extends SWCommand { public TimeCommand() { super("time"); - } - - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Time"); - BauSystem.MESSAGE.sendPrefixless("OTHER_TIME_HELP_1", p); + addDefaultHelpMessage("OTHER_TIME_HELP"); } @Register diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/TpsCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/TpsCommand.java index ebf58b2d..f964c156 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/TpsCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/TpsCommand.java @@ -19,7 +19,7 @@ package de.steamwar.bausystem.features.other; -import de.steamwar.bausystem.config.ColorConfig; +import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.features.tpslimit.TPSWarpUtils; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; @@ -38,17 +38,18 @@ public class TpsCommand extends SWCommand { @Register(help = true) public void genericCommand(Player p, String... args) { - p.sendMessage(ColorConfig.BASE + "TPS: 1s 10s 1m 5m 10m"); - p.sendMessage(" " + - ColorConfig.HIGHLIGHT.toString() + TPSWarpUtils.getTps(TPSWatcher.TPSType.ONE_SECOND) + ColorConfig.OTHER + " " + - ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.TEN_SECONDS) + ColorConfig.OTHER + " " + - ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.ONE_MINUTE) + ColorConfig.OTHER + " " + - ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.FIVE_MINUTES) + ColorConfig.OTHER + " " + - ColorConfig.HIGHLIGHT + TPSWarpUtils.getTps(TPSWatcher.TPSType.TEN_MINUTES) + ColorConfig.OTHER + " "); + BauSystem.MESSAGE.sendPrefixless("OTHER_TPS_HEAD", p); + BauSystem.MESSAGE.send("OTHER_TPS_MESSAGE", p, + TPSWarpUtils.getTps(TPSWatcher.TPSType.ONE_SECOND), + TPSWarpUtils.getTps(TPSWatcher.TPSType.TEN_SECONDS), + TPSWarpUtils.getTps(TPSWatcher.TPSType.ONE_MINUTE), + TPSWarpUtils.getTps(TPSWatcher.TPSType.FIVE_MINUTES), + TPSWarpUtils.getTps(TPSWatcher.TPSType.TEN_MINUTES) + ); } @Register public void genericCommand(Player p, TPSWatcher.TPSType type) { - p.sendMessage(ColorConfig.BASE + "TPS: " + ColorConfig.HIGHLIGHT.toString() + TPSWarpUtils.getTps(type)); + BauSystem.MESSAGE.sendPrefixless("OTHER_TPS_SINGLE", p, TPSWarpUtils.getTps(type)); } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/other/WorldSpawnCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/other/WorldSpawnCommand.java index 2a943463..56357ef2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/other/WorldSpawnCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/other/WorldSpawnCommand.java @@ -19,7 +19,6 @@ package de.steamwar.bausystem.features.other; -import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; @@ -37,13 +36,7 @@ public class WorldSpawnCommand extends SWCommand { super("worldspawn"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Worldspawn"); - BauSystem.MESSAGE.sendPrefixless("OTHER_WORLDSPAWN_HELP_1", p); - } - - @Register + @Register(description = "OTHER_WORLDSPAWN_HELP") public void genericCommand(Player p) { p.teleport(WORLD.getSpawnLocation().add(0.5, 0, 0.5), PlayerTeleportEvent.TeleportCause.COMMAND); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/redstonetester/RedstonetesterCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/redstonetester/RedstonetesterCommand.java index 20e6c12f..9917b313 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/redstonetester/RedstonetesterCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/redstonetester/RedstonetesterCommand.java @@ -33,13 +33,7 @@ public class RedstonetesterCommand extends SWCommand { super("redstonetester", "rt"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Redstone Tester"); - BauSystem.MESSAGE.sendPrefixless("RT_HELP_1", p); - } - - @Register + @Register(description = "RT_HELP") public void genericCommand(Player p) { BauSystem.MESSAGE.send("RT_GIVEN", p); SWUtils.giveItemToPlayer(p, RedstonetesterUtils.getWand(p)); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/ColorCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/ColorCommand.java index 921b20eb..cc4423bc 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/ColorCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/ColorCommand.java @@ -20,7 +20,6 @@ package de.steamwar.bausystem.features.region; import de.steamwar.bausystem.BauSystem; -import de.steamwar.bausystem.Permission; import de.steamwar.bausystem.config.BauServer; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; @@ -49,19 +48,12 @@ public class ColorCommand extends SWCommand { super("color"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Color"); - BauSystem.MESSAGE.sendPrefixless("REGION_COLOR_HELP_1", p); - BauSystem.MESSAGE.sendPrefixless("REGION_COLOR_HELP_2", p); - } - - @Register + @Register(description = "REGION_COLOR_HELP_COLOR") public void genericColor(Player p, ColorMode color) { genericColorSet(p, color, ColorizationType.LOCAL); } - @Register + @Register(description = "REGION_COLOR_HELP_COLOR_TYPE") public void genericColorSet(@Guard Player p, ColorMode color, ColorizationType colorizationType) { if (colorizationType == ColorizationType.GLOBAL) { Region.setGlobal(Flag.COLOR, color); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/DamageCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/DamageCommand.java index ef5f7fbf..cedb7851 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/DamageCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/DamageCommand.java @@ -41,13 +41,7 @@ public class DamageCommand extends SWCommand { super("damage", "dmg"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Damage"); - BauSystem.MESSAGE.sendPrefixless("REGION_DAMAGE_HELP_1", p); - } - - @Register + @Register(description = "REGION_DAMAGE_HELP") public void toggleCommand(@Guard Player p) { Region region = Region.getRegion(p.getLocation()); if (toggle(region)) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireCommand.java index 06473ca8..17296ba2 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/FireCommand.java @@ -40,13 +40,7 @@ public class FireCommand extends SWCommand { super("fire"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Fire"); - BauSystem.MESSAGE.sendPrefixless("REGION_FIRE_HELP_1", p); - } - - @Register + @Register(description = "REGION_FIRE_HELP") public void toggleCommand(@Guard Player p) { Region region = Region.getRegion(p.getLocation()); if (toggle(region)) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeCommand.java index 2847bb50..d4f53f6e 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/FreezeCommand.java @@ -40,13 +40,7 @@ public class FreezeCommand extends SWCommand { super("freeze", "stoplag"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Freeze"); - BauSystem.MESSAGE.sendPrefixless("REGION_FREEZE_HELP_1", p); - } - - @Register + @Register(description = "REGION_FREEZE_HELP") public void toggleCommand(@Guard Player p) { Region region = Region.getRegion(p.getLocation()); if (toggle(region)) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectCommand.java index 857e92e7..bb31f185 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/ProtectCommand.java @@ -40,13 +40,7 @@ public class ProtectCommand extends SWCommand { super("protect"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Freeze"); - BauSystem.MESSAGE.sendPrefixless("REGION_PROTECT_HELP_1", p); - } - - @Register + @Register(description = "REGION_PROTECT_HELP") public void genericProtectCommand(@Guard Player p) { Region region = regionCheck(p); if (region == null) return; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java index a46c2e5f..4d07ca8a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/RegionCommand.java @@ -74,17 +74,17 @@ public class RegionCommand extends SWCommand { @Register(help = true) public void genericHelp(Player player, String... args) { BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", player, "Region"); - BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_1", player); - BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_2", player); - BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_3", player); - BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_4", player); - BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_5", player); - BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_6", player); - BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_7", player); - BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_8", player); + BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_UNDO", player); + BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_REDO", player); + BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_RESTORE", player); + BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_SELECT", player); + BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_SELECT_EXTENSION", player); + BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_COLOR", player); + BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_COPYPOINT", player); + BauSystem.MESSAGE.sendPrefixless("REGION_REGION_HELP_TESTBLOCKPOINT", player); } - @Register("undo") + @Register(value = "undo", description = "REGION_REGION_HELP_UNDO") public void undoCommand(@Guard("WORLD_EDIT") Player p) { Region region = Region.getRegion(p.getLocation()); if (checkGlobalRegion(region, p)) return; @@ -96,17 +96,7 @@ public class RegionCommand extends SWCommand { } } - @Register - public void baurahmenCommand(Player p, RegionType regionType) { - selectCommand.baurahmenCommand(p, regionType, RegionExtensionType.NORMAL); - } - - @Register - public void baurahmenCommand(Player p, RegionType regionType, RegionExtensionType regionExtensionType) { - selectCommand.baurahmenCommand(p, regionType, regionExtensionType); - } - - @Register("redo") + @Register(value = "redo", description = "REGION_REGION_HELP_REDO") public void redoCommand(@Guard("WORLD_EDIT") Player p) { Region region = Region.getRegion(p.getLocation()); if (checkGlobalRegion(region, p)) { @@ -120,7 +110,7 @@ public class RegionCommand extends SWCommand { } } - @Register("restore") + @Register(value = "restore", description = "REGION_REGION_HELP_RESTORE") public void genericRestoreCommand(@Guard("WORLD_EDIT") Player p) { Region region = Region.getRegion(p.getLocation()); if(checkGlobalRegion(region, p)) return; @@ -134,12 +124,7 @@ public class RegionCommand extends SWCommand { } } - @Register("color") - public void colorCommand(Player p, ColorMode color) { - colorCommand.genericColor(p, color); - } - - @Register("restore") + @Register(value = "restore", description = "REGION_REGION_HELP_RESTORE_SCHEMATIC") public void schematicRestoreCommand(@Guard("WORLD_EDIT") Player p, String s) { Region region = Region.getRegion(p.getLocation()); if (checkGlobalRegion(region, p)) return; @@ -158,7 +143,22 @@ public class RegionCommand extends SWCommand { } } - @Register("copypoint") + @Register(description = "REGION_REGION_HELP_SELECT") + public void baurahmenCommand(Player p, RegionType regionType) { + selectCommand.baurahmenCommand(p, regionType, RegionExtensionType.NORMAL); + } + + @Register(description = "REGION_REGION_HELP_SELECT_EXTENSION") + public void baurahmenCommand(Player p, RegionType regionType, RegionExtensionType regionExtensionType) { + selectCommand.baurahmenCommand(p, regionType, regionExtensionType); + } + + @Register(value = "color", description = "REGION_REGION_HELP_COLOR") + public void colorCommand(Player p, ColorMode color) { + colorCommand.genericColor(p, color); + } + + @Register(value = "copypoint", description = "REGION_REGION_HELP_COPYPOINT") public void copyPointCommand(Player p) { Region region = Region.getRegion(p.getLocation()); if (checkGlobalRegion(region, p)) { @@ -172,7 +172,7 @@ public class RegionCommand extends SWCommand { BauSystem.MESSAGE.send("REGION_REGION_TP_COPY", p); } - @Register("testblockpoint") + @Register(value = "testblockpoint", description = "REGION_REGION_HELP_TESTBLOCKPOINT") @Register("tbpoint") public void testBlockPointCommand(Player p) { Region region = Region.getRegion(p.getLocation()); @@ -187,7 +187,7 @@ public class RegionCommand extends SWCommand { BauSystem.MESSAGE.send("REGION_REGION_TP_TEST_BLOCK", p); } - @Register("changetype") + @Register(value = "changetype", description = "REGION_REGION_HELP_CHANGETYPE_INFO") @Register("type") public void changeTypeCommand(Player p) { Region region = Region.getRegion(p.getLocation()); @@ -197,7 +197,7 @@ public class RegionCommand extends SWCommand { BauSystem.MESSAGE.send("REGION_REGION_CHANGETYPE_INFO", p, region.getPrototype().getDisplayName()); } - @Register("changetype") + @Register(value = "changetype", description = "REGION_REGION_HELP_CHANGETYPE") @Register("type") public void changeTypeCommand(@Guard("WORLD") Player p, @Mapper("regionTypeMapper") String s) { Region region = Region.getRegion(p.getLocation()); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/ResetCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/ResetCommand.java index 7f038d57..1d0c0454 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/ResetCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/ResetCommand.java @@ -45,14 +45,7 @@ public class ResetCommand extends SWCommand { super("reset"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Reset"); - BauSystem.MESSAGE.sendPrefixless("REGION_RESET_HELP_1", p); - BauSystem.MESSAGE.sendPrefixless("REGION_RESET_HELP_2", p); - } - - @Register + @Register(description = "REGION_RESET_HELP_RESET") public void genericResetCommand(@Guard Player p) { Region region = regionCheck(p); if (region == null) return; @@ -65,7 +58,7 @@ public class ResetCommand extends SWCommand { } } - @Register + @Register(description = "REGION_RESET_HELP_SCHEMATIC") public void schematicResetCommand(@Guard Player p, String s) { Region region = regionCheck(p); if (region == null) return; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTCommand.java index 6922d0d4..d7b5cfcc 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TNTCommand.java @@ -47,17 +47,17 @@ public class TNTCommand extends SWCommand { @Register(help = true) public void genericHelp(Player p, String... args) { BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Tnt"); - BauSystem.MESSAGE.sendPrefixless("REGION_TNT_HELP_1", p); - BauSystem.MESSAGE.sendPrefixless("REGION_TNT_HELP_2", p); + BauSystem.MESSAGE.sendPrefixless("REGION_TNT_HELP", p); + BauSystem.MESSAGE.sendPrefixless("REGION_TNT_HELP_MODE", p); } - @Register + @Register(description = "REGION_TNT_HELP") public void toggleCommand(@Guard Player p) { Region region = Region.getRegion(p.getLocation()); tntToggle(region, null, null); } - @Register + @Register(description = "REGION_TNT_HELP_MODE") public void setCommand(@Guard Player p, TNTMode tntMode) { Region region = Region.getRegion(p.getLocation()); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java index 7cfb3db7..138ab34b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/region/TestblockCommand.java @@ -46,19 +46,12 @@ public class TestblockCommand extends SWCommand { super("testblock", "tb"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Testblock"); - BauSystem.MESSAGE.sendPrefixless("REGION_TB_HELP_1", p); - BauSystem.MESSAGE.sendPrefixless("REGION_TB_HELP_2", p); - } - - @Register + @Register(description = "REGION_TB_HELP_RESET") public void genericTestblockCommand(Player p) { genericTestblockCommand(p, RegionExtensionType.NORMAL); } - @Register + @Register(description = "REGION_TB_HELP_RESET_EXTENSION") public void genericTestblockCommand(@Guard Player p, RegionExtensionType regionExtensionType) { Region region = regionCheck(p); if (region == null) return; @@ -71,7 +64,7 @@ public class TestblockCommand extends SWCommand { } } - @Register + @Register(description = "REGION_TB_HELP_SCHEMATIC") public void schematicTestblockCommand(Player p, String s) { schematicTestblockCommand(p, s, RegionExtensionType.NORMAL); } @@ -81,7 +74,7 @@ public class TestblockCommand extends SWCommand { schematicTestblockCommand(p, s, regionExtensionType); } - @Register + @Register(description = "REGION_TB_HELP_SCHEMATIC_EXTENSION") public void schematicTestblockCommand(@Guard Player p, String s, RegionExtensionType regionExtensionType) { Region region = regionCheck(p); if (region == null) return; diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java index 3d475709..88f96929 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptCommand.java @@ -29,14 +29,7 @@ public class ScriptCommand extends SWCommand { private static List> swItems = new ArrayList<>(); - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "script"); - BauSystem.MESSAGE.sendPrefixless("SCRIPT_COMMAND_HELP_1", p); - BauSystem.MESSAGE.sendPrefixless("SCRIPT_COMMAND_HELP_2", p); - } - - @Register + @Register(description = "SCRIPT_COMMAND_HELP") public void menuCommand(Player p) { if (swItems.isEmpty()) { for (int i = 0; i < 3; i++) { @@ -149,7 +142,7 @@ public class ScriptCommand extends SWCommand { swListInv.open(); } - @Register({"menu"}) + @Register(value = "menu", description = "SCRIPT_COMMAND_HELP_MENU") public void menuGUICommand(Player p) { customScriptListener.openCommandsMenu(p); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptVarsCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptVarsCommand.java index 25a868e9..391930b1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptVarsCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptVarsCommand.java @@ -29,7 +29,10 @@ import de.steamwar.command.SWCommandUtils; import de.steamwar.command.TypeMapper; import org.bukkit.entity.Player; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; @Linked(LinkageType.COMMAND) public class ScriptVarsCommand extends SWCommand { @@ -38,16 +41,7 @@ public class ScriptVarsCommand extends SWCommand { super("scriptvars"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Scriptvars"); - BauSystem.MESSAGE.sendPrefixless("SCRIPT_COMMAND_VARS_HELP_1", p); - BauSystem.MESSAGE.sendPrefixless("SCRIPT_COMMAND_VARS_HELP_2", p); - BauSystem.MESSAGE.sendPrefixless("SCRIPT_COMMAND_VARS_HELP_3", p); - BauSystem.MESSAGE.sendPrefixless("SCRIPT_COMMAND_VARS_HELP_4", p); - } - - @Register + @Register(description = "SCRIPT_COMMAND_VARS_HELP") public void genericCommand(Player p) { Context context = ScriptListener.getGlobalContext(p); if (context.allVariables().isEmpty()) { @@ -66,7 +60,7 @@ public class ScriptVarsCommand extends SWCommand { } } - @Register + @Register(description = "SCRIPT_COMMAND_VARS_HELP_VAR") public void getCommand(Player p, String varName) { Context context = ScriptListener.getGlobalContext(p); if (context.allVariables().isEmpty()) { @@ -80,7 +74,7 @@ public class ScriptVarsCommand extends SWCommand { BauSystem.MESSAGE.send("SCRIPT_COMMAND_VARS_ELEMENT", p, varName, context.getValue(varName).asString()); } - @Register + @Register(description = "SCRIPT_COMMAND_VARS_HELP_SET") public void setValueCommand(Player p, String varName, int value) { Context context = ScriptListener.getGlobalContext(p); context.putValue(varName, new Value.LongValue(value)); @@ -102,7 +96,7 @@ public class ScriptVarsCommand extends SWCommand { BauSystem.MESSAGE.send("SCRIPT_COMMAND_VARS_SET_VALUE", p, varName, s); } - @Register + @Register(description = "SCRIPT_COMMAND_VARS_HELP_DELETE") public void removeCommand(Player p, String varName, @Mapper(value = "Delete") String remove) { Context context = ScriptListener.getGlobalContext(p); if (context.allVariables().isEmpty()) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java index 92e70064..10a4270b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/UnsignCommand.java @@ -19,7 +19,6 @@ package de.steamwar.bausystem.features.script; -import de.steamwar.bausystem.BauSystem; import de.steamwar.bausystem.linkage.LinkageType; import de.steamwar.bausystem.linkage.Linked; import de.steamwar.command.SWCommand; @@ -35,13 +34,7 @@ public class UnsignCommand extends SWCommand { super("unsign"); } - @Register(help = true) - public void genericHelp(Player p, String... args) { - BauSystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", p, "Unsign"); - BauSystem.MESSAGE.sendPrefixless("UNSIGN_HELP", p); - } - - @Register + @Register(description = "UNSIGN_HELP") public void unsignCommand(Player p) { ItemStack itemStack = p.getInventory().getItemInMainHand(); if (isNoBook(itemStack)) return;