Fix failing command tests

- Detailed description missing period
- Fix twice defined /authme delete
- Add executable command to HelpSyntaxHelperTest initializations
- Remove unneeded constructors in CommandDescription
This commit is contained in:
ljacqu
2015-11-29 10:56:01 +01:00
parent 6a94135f64
commit 7c652feac2
4 changed files with 65 additions and 52 deletions
@@ -59,19 +59,6 @@ public class CommandDescription {
*/
private CommandPermissions permissions;
/**
* Constructor.
*
* @param executableCommand The executable command, or null.
* @param label Command label.
* @param description Command description.
* @param detailedDescription Detailed comment description.
* @param parent Parent command.
*/
public CommandDescription(ExecutableCommand executableCommand, String label, String description, String detailedDescription, CommandDescription parent) {
this(executableCommand, label, description, parent, detailedDescription, null);
}
/**
* Constructor.
*
@@ -85,25 +72,6 @@ public class CommandDescription {
this(executableCommand, labels, description, detailedDescription, parent, null);
}
/**
* Constructor.
*
* @param executableCommand The executable command, or null.
* @param label Command label.
* @param description Command description.
* @param parent Parent command.
* @param detailedDescription Detailed comment description.
* @param arguments Command arguments.
*/
public CommandDescription(ExecutableCommand executableCommand, String label, String description, CommandDescription parent, String detailedDescription, List<CommandArgumentDescription> arguments) {
setExecutableCommand(executableCommand);
this.labels = Collections.singletonList(label);
this.description = description;
this.detailedDescription = detailedDescription;
setParent(parent);
setArguments(arguments);
}
/**
* Constructor.
*
@@ -81,7 +81,7 @@ public class CommandManager {
// Register the unregister command
CommandDescription unregisterCommand = CommandDescription.builder()
.executableCommand(new UnregisterCommand())
.labels("unregister", "unreg", "unr", "delete", "del")
.labels("unregister", "unreg", "unr")
.description("Unregister a player")
.detailedDescription("Unregister the specified player.")
.parent(authMeBaseCommand)
@@ -117,7 +117,7 @@ public class CommandManager {
.executableCommand(new LastLoginCommand())
.labels("lastlogin", "ll")
.description("Player's last login")
.detailedDescription("View the date of the specified players last login")
.detailedDescription("View the date of the specified players last login.")
.parent(authMeBaseCommand)
.permissions(OP_ONLY, AdminPermission.LAST_LOGIN)
.withArgument("player", "Player name", true)