Skip to content

Commit

Permalink
Fix command registration
Browse files Browse the repository at this point in the history
  • Loading branch information
sgdc3 committed Feb 19, 2016
1 parent ecc3048 commit 7156228
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/main/java/fr/xephi/authme/command/CommandInitializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,17 @@ public static Set<CommandDescription> buildCommands() {
.executableCommand(new VersionCommand())
.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
final CommandDescription LOGIN_BASE = CommandDescription.builder()
.parent(null)
Expand Down Expand Up @@ -381,18 +392,6 @@ public static Set<CommandDescription> buildCommands() {
.executableCommand(new CaptchaCommand())
.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(
AUTHME_BASE,
LOGIN_BASE,
Expand All @@ -401,8 +400,7 @@ public static Set<CommandDescription> buildCommands() {
UNREGISTER_BASE,
CHANGE_PASSWORD_BASE,
EMAIL_BASE,
CAPTCHA_BASE,
CONVERTER_BASE);
CAPTCHA_BASE);

setHelpOnAllBases(baseCommands);
return baseCommands;
Expand Down

0 comments on commit 7156228

Please sign in to comment.