Fix command registration

This commit is contained in:
Gabriele C 2016-02-19 16:38:18 +01:00
parent ecc3048f52
commit 715622826f

View File

@ -269,6 +269,17 @@ public final class CommandInitializer {
.executableCommand(new VersionCommand()) .executableCommand(new VersionCommand())
.build(); .build();
CommandDescription.builder()
.parent(AUTHME_BASE)
.labels("converter", "convert", "conv")
.description("Converter Command")
.detailedDescription("Converter command for AuthMeReloaded.")
.withArgument("job", "Conversion job: xauth / crazylogin / rakamak / " +
"royalauth / vauth / sqlitetosql", false)
.permissions(OP_ONLY, AdminPermission.CONVERTER)
.executableCommand(new ConverterCommand())
.build();
// Register the base login command // Register the base login command
final CommandDescription LOGIN_BASE = CommandDescription.builder() final CommandDescription LOGIN_BASE = CommandDescription.builder()
.parent(null) .parent(null)
@ -381,18 +392,6 @@ public final class CommandInitializer {
.executableCommand(new CaptchaCommand()) .executableCommand(new CaptchaCommand())
.build(); .build();
// Register the base converter command
CommandDescription CONVERTER_BASE = CommandDescription.builder()
.parent(AUTHME_BASE)
.labels("converter", "convert", "conv")
.description("Converter Command")
.detailedDescription("Converter command for AuthMeReloaded.")
.withArgument("job", "Conversion job: xauth / crazylogin / rakamak / " +
"royalauth / vauth / sqlitetosql", false)
.permissions(OP_ONLY, AdminPermission.CONVERTER)
.executableCommand(new ConverterCommand())
.build();
Set<CommandDescription> baseCommands = ImmutableSet.of( Set<CommandDescription> baseCommands = ImmutableSet.of(
AUTHME_BASE, AUTHME_BASE,
LOGIN_BASE, LOGIN_BASE,
@ -401,8 +400,7 @@ public final class CommandInitializer {
UNREGISTER_BASE, UNREGISTER_BASE,
CHANGE_PASSWORD_BASE, CHANGE_PASSWORD_BASE,
EMAIL_BASE, EMAIL_BASE,
CAPTCHA_BASE, CAPTCHA_BASE);
CONVERTER_BASE);
setHelpOnAllBases(baseCommands); setHelpOnAllBases(baseCommands);
return baseCommands; return baseCommands;