diff --git a/src/de/steamwar/bungeecore/commands/HelpCommand.java b/src/de/steamwar/bungeecore/commands/HelpCommand.java index afb08f55..4d0e491f 100644 --- a/src/de/steamwar/bungeecore/commands/HelpCommand.java +++ b/src/de/steamwar/bungeecore/commands/HelpCommand.java @@ -26,13 +26,14 @@ import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.connection.ProxiedPlayer; public class HelpCommand extends BasicCommand { + public HelpCommand() { super("help", "", "?"); } @Override public void execute(CommandSender sender, String[] args) { - if(args.length != 1){ + if (args.length < 1) { Message.send("HELP_LOBBY", true, sender, ChatMessageType.SYSTEM, Message.parse("HELP_LOBBY_HOVER", sender), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/l")); Message.send("HELP_BAU", true, sender, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_HOVER", sender), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/bau")); Message.send("HELP_BAUSERVER", true, sender, ChatMessageType.SYSTEM, Message.parse("HELP_BAUSERVER_HOVER", sender), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/help bauserver")); @@ -42,28 +43,59 @@ public class HelpCommand extends BasicCommand { Message.send("HELP_TEAM", true, sender, ChatMessageType.SYSTEM, Message.parse("HELP_TEAM_HOVER", sender), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team")); Message.send("HELP_JOIN", true, sender, ChatMessageType.SYSTEM, Message.parse("HELP_JOIN_HOVER", sender), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join")); Message.send("HELP_LOCAL", true, sender, ChatMessageType.SYSTEM, Message.parse("HELP_LOCAL_HOVER", sender), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/local")); - }else if(args[0].equalsIgnoreCase("bauserver")){ + return; + } + if (args[0].equalsIgnoreCase("bauserver")) { sendBauHelp((ProxiedPlayer) sender); - }else if(args[0].equalsIgnoreCase("bau")){ - Message.sendPrefixless("HELP_TNT", sender); - Message.sendPrefixless("HELP_FIRE", sender); - Message.sendPrefixless("HELP_TESTBLOCK", sender); - Message.sendPrefixless("HELP_RESET", sender); - Message.sendPrefixless("HELP_SPEED", sender); - Message.sendPrefixless("HELP_NV", sender); - Message.sendPrefixless("HELP_WV", sender); - Message.sendPrefixless("HELP_TRACE", sender); - Message.sendPrefixless("HELP_LOADER", sender); - Message.sendPrefixless("HELP_PROTECT", sender); - Message.sendPrefixless("HELP_FREEZE", sender); - Message.sendPrefixless("HELP_SKULL", sender); - Message.sendPrefixless("HELP_DEBUGSTICK", sender); - Message.sendPrefixless("HELP_BAUINFO", sender); - Message.sendPrefixless("HELP_BAUSERVER_SHORT", sender); + } + if (args[0].equalsIgnoreCase("bau")) { + bauHelpGroup((ProxiedPlayer) sender, args); + return; + } + + } + + private static void bauHelpGroup(ProxiedPlayer p, String[] args) { + if (args.length < 2) { + sendBauHelpGroup(p); + return; + } + + switch (args[1].toLowerCase()) { + case "admin": + case "owner": + case "bauwelt": + sendBauHelpAdmin(p); + return; + case "world": + sendBauHelpWorld(p); + return; + case "player": + sendBauHelpPlayer(p); + return; + case "worldedit": + case "we": + case "world-edit": + case "edit": + sendBauHelpWorldEdit(p); + return; + case "other": + sendBauHelpOther(p); + return; + default: + sendBauHelpGroup(p); } } - static void sendBauHelp(ProxiedPlayer p){ + private static void sendBauHelpGroup(ProxiedPlayer p) { + Message.send("HELP_BAU_GROUP_ADMIN", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_GROUP_ADMIN_HOVER", p), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/help bau admin")); + Message.send("HELP_BAU_GROUP_WORLD", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_GROUP_WORLD_HOVER", p), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/help bau world")); + Message.send("HELP_BAU_GROUP_PLAYER", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_GROUP_PLAYER_HOVER", p), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/help bau player")); + Message.send("HELP_BAU_GROUP_WE", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_GROUP_WE_HOVER", p), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/help bau we")); + Message.send("HELP_BAU_GROUP_OTHER", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_GROUP_OTHER_HOVER", p), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/help bau other")); + } + + static void sendBauHelp(ProxiedPlayer p) { Message.send("HELP_BAU_TP", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_TP_HOVER", p), new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/bau tp ")); Message.send("HELP_BAU_ADDMEMBER", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_ADDMEMBER_HOVER", p), new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/bau addmember ")); Message.send("HELP_BAU_DELMEMBER", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_DELMEMBER_HOVER", p), new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/bau delmember ")); @@ -74,4 +106,51 @@ public class HelpCommand extends BasicCommand { Message.send("HELP_BAU_TESTARENA", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_TESTARENA_HOVER", p), new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/bau testarena ")); Message.send("HELP_BAU_BAU", true, p, ChatMessageType.SYSTEM, Message.parse("HELP_BAU_BAU_HOVER", p), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/help bau")); } + + static void sendBauHelpWorld(ProxiedPlayer p) { + Message.send("HELP_BAU_GROUP_WORLD_TITLE", p); + Message.sendPrefixless("HELP_TNT", p); + Message.sendPrefixless("HELP_FIRE", p); + Message.sendPrefixless("HELP_FREEZE", p); + Message.sendPrefixless("HELP_TPSLIMIT", p); + Message.sendPrefixless("HELP_PROTECT", p); + Message.sendPrefixless("HELP_RESET", p); + } + + static void sendBauHelpPlayer(ProxiedPlayer p) { + Message.sendPrefixless("HELP_BAU_GROUP_PLAYER_TITLE", p); + Message.sendPrefixless("HELP_SPEED", p); + Message.sendPrefixless("HELP_NV", p); + Message.sendPrefixless("HELP_WV", p); + Message.sendPrefixless("HELP_DEBUGSTICK", p); + Message.sendPrefixless("HELP_TRACE", p); + Message.sendPrefixless("HELP_LOADER", p); + } + + static void sendBauHelpAdmin(ProxiedPlayer p) { + Message.send("HELP_BAU_GROUP_ADMIN_TITLE", p); + sendBauHelp(p); + } + + static void sendBauHelpWorldEdit(ProxiedPlayer p) { + Message.sendPrefixless("HELP_BAU_GROUP_WE_TITLE", p); + Message.sendPrefixless("HELP_WE_POS1", p); + Message.sendPrefixless("HELP_WE_POS2", p); + Message.sendPrefixless("HELP_WE_COPY", p); + Message.sendPrefixless("HELP_WE_PASTE", p); + Message.sendPrefixless("HELP_WE_FLOPY", p); + Message.sendPrefixless("HELP_WE_FLOPYP", p); + Message.sendPrefixless("HELP_WE_ROTATE_90", p); + Message.sendPrefixless("HELP_WE_ROTATE_180", p); + Message.sendPrefixless("HELP_WE_ROTATE_N90", p); + } + + static void sendBauHelpOther(ProxiedPlayer p) { + Message.sendPrefixless("HELP_BAU_GROUP_OTHER_TITLE", p); + Message.sendPrefixless("HELP_TESTBLOCK", p); + Message.sendPrefixless("HELP_SKULL", p); + Message.sendPrefixless("HELP_BAUINFO", p); + Message.sendPrefixless("HELP_BAUSERVER_SHORT", p); + } + } diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 586f1a76..14172c9a 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -32,6 +32,7 @@ HELP_SPEED=§8/§espeed §8- §7Ändert deine Fluggeschwindigkeit HELP_NV=§8/§env §8- §7(de)aktiviert Nachtsicht HELP_WV=§8/§ewv §8- §7(de)aktiviert Unterwassersicht HELP_TRACE=§8/§etrace §8- §7Gibt einen Überblick über den TNT-Tracer +HELP_TPSLIMIT="§8/§etpslimit §8- §7Gibt einen Überblick über den TPS-Limiter" HELP_LOADER=§8/§eloader §8- §7Nutze den automatischen Kanonenlader HELP_PROTECT=§8/§eprotect §8- §7Schützt den Boden der (M)WG-Region HELP_FREEZE=§8/§efreeze §8- §7Unterbindet Blockupdates @@ -40,6 +41,32 @@ HELP_DEBUGSTICK=§8/§edebugstick §8- §7Gibt dir einen Debugstick (nur 1.15) HELP_BAUINFO=§8/§ebauinfo §8- §7Gibt dir Informationen über den Bauserver HELP_BAUSERVER_SHORT=§8/§ehelp bauserver §8- §7Hilfe zum Bauserver +HELP_WE_POS1=§8//§e1 §8» //§epos1 +HELP_WE_POS2=§8//§e2 §8» //§epos2 +HELP_WE_COPY=§8//§ec §8» //§ecopy +HELP_WE_PASTE=§8//§ep §8» //§epaste +HELP_WE_FLOPY=§8//§eflopy §8» //§ecopy §7& §8//§eflip +HELP_WE_FLOPYP=§8//§eflopyp §8» //§ecopy §7& §8//§eflip §7& §8//§epaste +HELP_WE_ROTATE_90=§8//§e90 §8» //§erotate 90 +HELP_WE_ROTATE_180=§8//§e180 §8» //§erotate 180 +HELP_WE_ROTATE_N90=§8//§e-90 §8» //§erotate -90 + +HELP_BAU_GROUP_ADMIN=§7Bauserver-Verwaltungsbefehle +HELP_BAU_GROUP_ADMIN_HOVER=§eAlle Verwaltungsbefehle +HELP_BAU_GROUP_ADMIN_TITLE=§7Alle Verwaltungsbefehle§8: +HELP_BAU_GROUP_OTHER=§7Weitere Bauserverbefehle +HELP_BAU_GROUP_OTHER_HOVER=§eWeitere Bauserverbefehle +HELP_BAU_GROUP_OTHER_TITLE=§7Weitere Bauserverbefehle§8: +HELP_BAU_GROUP_WE=§7WorldEdit-Abkürzungen +HELP_BAU_GROUP_WE_HOVER=§eWorldEdit-Abkürzungen +HELP_BAU_GROUP_WE_TITLE=§7WorldEdit-Abkürzungen§8: +HELP_BAU_GROUP_PLAYER=§7Spielerbefehle +HELP_BAU_GROUP_PLAYER_HOVER=§eSpielerbefehle +HELP_BAU_GROUP_PLAYER_TITLE=§7Spielerbefehle§8: +HELP_BAU_GROUP_WORLD=§7Weltverändernde Bauserverbefehle +HELP_BAU_GROUP_WORLD_HOVER=§eWeltverändernde Bauserverbefehle +HELP_BAU_GROUP_WORLD_TITLE=§7Weltverändernde Bauserverbefehle§8: + HELP_BAU_TP=§8/§ebau tp §8- §7Gehe auf Bauserver von Freunden! HELP_BAU_TP_HOVER=§eZu einem anderen Bauserver HELP_BAU_ADDMEMBER=§8/§ebau addmember §8- §7Fügt einen Freund hinzu