diff --git a/README.md b/README.md index c862068f1..ff0b7f4dd 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ typing commands or using the inventory. It can also kick players with uncommonly
  • Website Integration
  • Click here for an example of the Config file
  • How to convert from Rakamak -
  • Convert from FlatFile (auths.db but not the sqlite one) to MySQL: /converter +
  • Convert from FlatFile (auths.db but not the sqlite one) to MySQL: /authme converter

  • diff --git a/src/main/java/fr/xephi/authme/command/CommandInitializer.java b/src/main/java/fr/xephi/authme/command/CommandInitializer.java index 12d07f9ea..0f73effaa 100644 --- a/src/main/java/fr/xephi/authme/command/CommandInitializer.java +++ b/src/main/java/fr/xephi/authme/command/CommandInitializer.java @@ -5,6 +5,7 @@ import fr.xephi.authme.command.executable.HelpCommand; import fr.xephi.authme.command.executable.authme.AccountsCommand; import fr.xephi.authme.command.executable.authme.AuthMeCommand; import fr.xephi.authme.command.executable.authme.ChangePasswordAdminCommand; +import fr.xephi.authme.command.executable.authme.ConverterCommand; import fr.xephi.authme.command.executable.authme.FirstSpawnCommand; import fr.xephi.authme.command.executable.authme.ForceLoginCommand; import fr.xephi.authme.command.executable.authme.GetEmailCommand; @@ -24,7 +25,6 @@ import fr.xephi.authme.command.executable.authme.UnregisterAdminCommand; import fr.xephi.authme.command.executable.authme.VersionCommand; import fr.xephi.authme.command.executable.captcha.CaptchaCommand; import fr.xephi.authme.command.executable.changepassword.ChangePasswordCommand; -import fr.xephi.authme.command.executable.converter.ConverterCommand; import fr.xephi.authme.command.executable.email.AddEmailCommand; import fr.xephi.authme.command.executable.email.ChangeEmailCommand; import fr.xephi.authme.command.executable.email.EmailBaseCommand; @@ -269,6 +269,17 @@ public final class CommandInitializer { .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) @@ -381,18 +392,6 @@ public final class CommandInitializer { .executableCommand(new CaptchaCommand()) .build(); - // Register the base converter command - CommandDescription CONVERTER_BASE = CommandDescription.builder() - .parent(null) - .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 baseCommands = ImmutableSet.of( AUTHME_BASE, LOGIN_BASE, @@ -401,8 +400,7 @@ public final class CommandInitializer { UNREGISTER_BASE, CHANGE_PASSWORD_BASE, EMAIL_BASE, - CAPTCHA_BASE, - CONVERTER_BASE); + CAPTCHA_BASE); setHelpOnAllBases(baseCommands); return baseCommands; diff --git a/src/main/java/fr/xephi/authme/command/executable/converter/ConverterCommand.java b/src/main/java/fr/xephi/authme/command/executable/authme/ConverterCommand.java similarity index 98% rename from src/main/java/fr/xephi/authme/command/executable/converter/ConverterCommand.java rename to src/main/java/fr/xephi/authme/command/executable/authme/ConverterCommand.java index cb3f6c7fe..e34144805 100644 --- a/src/main/java/fr/xephi/authme/command/executable/converter/ConverterCommand.java +++ b/src/main/java/fr/xephi/authme/command/executable/authme/ConverterCommand.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.command.executable.converter; +package fr.xephi.authme.command.executable.authme; import fr.xephi.authme.AuthMe; import fr.xephi.authme.command.CommandService; diff --git a/src/main/java/fr/xephi/authme/converter/ForceFlatToSqlite.java b/src/main/java/fr/xephi/authme/converter/ForceFlatToSqlite.java index 443e20ac9..c87297d8e 100644 --- a/src/main/java/fr/xephi/authme/converter/ForceFlatToSqlite.java +++ b/src/main/java/fr/xephi/authme/converter/ForceFlatToSqlite.java @@ -7,8 +7,6 @@ import fr.xephi.authme.datasource.DataSourceType; import fr.xephi.authme.datasource.SQLite; import fr.xephi.authme.settings.NewSetting; import fr.xephi.authme.settings.properties.DatabaseSettings; -import fr.xephi.authme.util.StringUtils; - import java.sql.SQLException; /** diff --git a/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java b/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java index 19b75f345..7ac10e258 100644 --- a/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java +++ b/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java @@ -23,7 +23,6 @@ import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitTask; -import java.util.Date; import java.util.List; /** diff --git a/src/main/java/fr/xephi/authme/process/register/AsyncRegister.java b/src/main/java/fr/xephi/authme/process/register/AsyncRegister.java index 29616fe52..c9ce3f6c9 100644 --- a/src/main/java/fr/xephi/authme/process/register/AsyncRegister.java +++ b/src/main/java/fr/xephi/authme/process/register/AsyncRegister.java @@ -1,13 +1,11 @@ package fr.xephi.authme.process.register; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.cache.auth.PlayerAuth; import fr.xephi.authme.cache.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.output.MessageKey; import fr.xephi.authme.output.Messages; -import fr.xephi.authme.permission.PlayerPermission; import fr.xephi.authme.permission.PlayerStatePermission; import fr.xephi.authme.security.HashAlgorithm; import fr.xephi.authme.security.crypts.HashedPassword; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index be7b792fa..bf63b3641 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -16,7 +16,7 @@ softdepend: commands: authme: description: AuthMe op commands - usage: '/authme reload|register playername password|changepassword playername password|unregister playername|version' + usage: '/authme reload|register playername password|changepassword playername password|unregister playername|version|converter' register: description: Register an account usage: /register @@ -40,9 +40,6 @@ commands: captcha: description: Captcha command usage: /captcha - converter: - description: Converter from different other auth plugins - usage: /converter permissions: authme.admin.*: description: Give access to all admin commands. diff --git a/src/test/java/fr/xephi/authme/command/CommandInitializerTest.java b/src/test/java/fr/xephi/authme/command/CommandInitializerTest.java index f8b0d256f..62c2b8905 100644 --- a/src/test/java/fr/xephi/authme/command/CommandInitializerTest.java +++ b/src/test/java/fr/xephi/authme/command/CommandInitializerTest.java @@ -50,7 +50,7 @@ public class CommandInitializerTest { // It obviously doesn't make sense to test much of the concrete data // that is being initialized; we just want to guarantee with this test // that data is indeed being initialized and we take a few "probes" - assertThat(commands.size(), equalTo(9)); + assertThat(commands.size(), equalTo(8)); assertThat(commandsIncludeLabel(commands, "authme"), equalTo(true)); assertThat(commandsIncludeLabel(commands, "register"), equalTo(true)); assertThat(commandsIncludeLabel(commands, "help"), equalTo(false));