Added help command for login
This commit is contained in:
parent
67ad350754
commit
f67cb02d23
@ -39,7 +39,7 @@ public class CommandManager {
|
|||||||
"The main AuthMeReloaded command. The root for all admin commands.", null);
|
"The main AuthMeReloaded command. The root for all admin commands.", null);
|
||||||
|
|
||||||
// Register the help command
|
// Register the help command
|
||||||
CommandDescription helpCommand = new CommandDescription(
|
CommandDescription authMeHelpCommand = new CommandDescription(
|
||||||
new HelpCommand(),
|
new HelpCommand(),
|
||||||
new ArrayList<String>() {{
|
new ArrayList<String>() {{
|
||||||
add("help");
|
add("help");
|
||||||
@ -51,8 +51,8 @@ public class CommandManager {
|
|||||||
"View help",
|
"View help",
|
||||||
"View detailed help pages about AuthMeReloaded commands.",
|
"View detailed help pages about AuthMeReloaded commands.",
|
||||||
authMeBaseCommand);
|
authMeBaseCommand);
|
||||||
helpCommand.addArgument(new CommandArgumentDescription("query", "The command or query to view help for.", true));
|
authMeHelpCommand.addArgument(new CommandArgumentDescription("query", "The command or query to view help for.", true));
|
||||||
helpCommand.setMaximumArguments(false);
|
authMeHelpCommand.setMaximumArguments(false);
|
||||||
|
|
||||||
// Register the register command
|
// Register the register command
|
||||||
CommandDescription registerCommand = new CommandDescription(
|
CommandDescription registerCommand = new CommandDescription(
|
||||||
@ -339,6 +339,22 @@ public class CommandManager {
|
|||||||
loginBaseCommand.setCommandPermissions("authme.login", CommandPermissions.DefaultPermission.ALLOWED);
|
loginBaseCommand.setCommandPermissions("authme.login", CommandPermissions.DefaultPermission.ALLOWED);
|
||||||
loginBaseCommand.addArgument(new CommandArgumentDescription("password", "Login password", false));
|
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
|
// Add the base commands to the commands array
|
||||||
this.commandDescriptions.add(authMeBaseCommand);
|
this.commandDescriptions.add(authMeBaseCommand);
|
||||||
this.commandDescriptions.add(loginBaseCommand);
|
this.commandDescriptions.add(loginBaseCommand);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user