Added help command for login

This commit is contained in:
Tim Visée 2015-11-01 20:16:35 +01:00
parent 67ad350754
commit f67cb02d23

View File

@ -39,7 +39,7 @@ public class CommandManager {
"The main AuthMeReloaded command. The root for all admin commands.", null);
// Register the help command
CommandDescription helpCommand = new CommandDescription(
CommandDescription authMeHelpCommand = new CommandDescription(
new HelpCommand(),
new ArrayList<String>() {{
add("help");
@ -51,8 +51,8 @@ public class CommandManager {
"View help",
"View detailed help pages about AuthMeReloaded commands.",
authMeBaseCommand);
helpCommand.addArgument(new CommandArgumentDescription("query", "The command or query to view help for.", true));
helpCommand.setMaximumArguments(false);
authMeHelpCommand.addArgument(new CommandArgumentDescription("query", "The command or query to view help for.", true));
authMeHelpCommand.setMaximumArguments(false);
// Register the register command
CommandDescription registerCommand = new CommandDescription(
@ -339,6 +339,22 @@ public class CommandManager {
loginBaseCommand.setCommandPermissions("authme.login", CommandPermissions.DefaultPermission.ALLOWED);
loginBaseCommand.addArgument(new CommandArgumentDescription("password", "Login password", false));
// Register the help command
CommandDescription loginHelpCommand = new CommandDescription(
new HelpCommand(),
new ArrayList<String>() {{
add("help");
add("hlp");
add("h");
add("sos");
add("?");
}},
"View help",
"View detailed help pages about AuthMeReloaded login commands.",
loginBaseCommand);
loginHelpCommand.addArgument(new CommandArgumentDescription("query", "The command or query to view help for.", true));
loginHelpCommand.setMaximumArguments(false);
// Add the base commands to the commands array
this.commandDescriptions.add(authMeBaseCommand);
this.commandDescriptions.add(loginBaseCommand);