diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5dbf935d..8cbdd56b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,12 +1,14 @@ [versions] guava = "33.2.1-jre" configme = "1.3.1" +jalu-injector = "1.0" adventure-api = "4.17.0" adventure-platform = "4.3.2" [libraries] guava = { module = "com.google.guava:guava", version.ref = "guava" } configme = { module = "ch.jalu:configme", version.ref = "configme" } +jalu-injector = { module = "ch.jalu:injector", version.ref = "jalu-injector" } adventure-text-minimessage = { module = "net.kyori:adventure-text-minimessage", version.ref = "adventure-api" } adventure-text-serializer-gson = { module = "net.kyori:adventure-text-serializer-gson", version.ref = "adventure-api" } adventure-platform-bukkit = { module = "net.kyori:adventure-platform-bukkit", version.ref = "adventure-platform" } \ No newline at end of file diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 6959dc4e..7e9e8343 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -24,6 +24,7 @@ subprojects { implementation(project(":project:module-configuration", "shadow")) implementation(project(":project:module-logger", "shadow")) implementation(project(":project:module-util", "shadow")) + implementation(project(":project:module-security", "shadow")) implementation(project(":project:module-common", "shadow")) implementation(project(":project:module-message", "shadow")) implementation(project(":project:module-database", "shadow")) diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/AuthMe.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/AuthMe.java index f2bff2dd..9046bee4 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/AuthMe.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/AuthMe.java @@ -28,8 +28,9 @@ import fr.xephi.authme.listener.PlayerListener19Spigot; import fr.xephi.authme.listener.PlayerListenerHigherThan18; import fr.xephi.authme.listener.PurgeListener; import fr.xephi.authme.listener.ServerListener; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.mail.EmailService; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.crypts.Sha256; import fr.xephi.authme.service.BackupService; import fr.xephi.authme.service.BukkitService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/ConverterCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/ConverterCommand.java index 15875ac9..815ecf58 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/ConverterCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/ConverterCommand.java @@ -3,7 +3,7 @@ package fr.xephi.authme.command.executable.authme; import ch.jalu.injector.factory.Factory; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableSortedMap; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.datasource.converter.Converter; import fr.xephi.authme.datasource.converter.CrazyLoginConverter; @@ -15,7 +15,7 @@ import fr.xephi.authme.datasource.converter.SqliteToH2; import fr.xephi.authme.datasource.converter.SqliteToSql; import fr.xephi.authme.datasource.converter.XAuthConverter; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.service.CommonService; import org.bukkit.command.CommandSender; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/RegisterAdminCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/RegisterAdminCommand.java index 7b2847f7..1fbf45b8 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/RegisterAdminCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/RegisterAdminCommand.java @@ -1,11 +1,11 @@ package fr.xephi.authme.command.executable.authme; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.PasswordSecurity; import fr.xephi.authme.security.crypts.HashedPassword; import fr.xephi.authme.service.BukkitService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/ReloadCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/ReloadCommand.java index 2956a39f..4b7d86f2 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/ReloadCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/ReloadCommand.java @@ -2,13 +2,13 @@ package fr.xephi.authme.command.executable.authme; import ch.jalu.injector.factory.SingletonStore; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.initialization.Reloadable; import fr.xephi.authme.initialization.SettingsDependent; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.CommonService; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.SettingsWarner; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/TotpDisableAdminCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/TotpDisableAdminCommand.java index 4789e043..c9123cb5 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/TotpDisableAdminCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/TotpDisableAdminCommand.java @@ -1,12 +1,12 @@ package fr.xephi.authme.command.executable.authme; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.message.MessageKey; import fr.xephi.authme.message.Messages; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/UpdateHelpMessagesCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/UpdateHelpMessagesCommand.java index 7f61afd0..66cdd673 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/UpdateHelpMessagesCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/UpdateHelpMessagesCommand.java @@ -1,9 +1,9 @@ package fr.xephi.authme.command.executable.authme; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.command.help.HelpMessagesService; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.HelpTranslationGenerator; import org.bukkit.command.CommandSender; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/DataStatistics.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/DataStatistics.java index 406ee17d..e928d014 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/DataStatistics.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/DataStatistics.java @@ -8,7 +8,7 @@ import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.initialization.HasCleanup; import fr.xephi.authme.initialization.Reloadable; import fr.xephi.authme.initialization.SettingsDependent; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.DebugSectionPermissions; import fr.xephi.authme.permission.PermissionNode; import org.bukkit.ChatColor; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/DebugSectionUtils.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/DebugSectionUtils.java index fa4200a0..f5184170 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/DebugSectionUtils.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/DebugSectionUtils.java @@ -1,10 +1,10 @@ package fr.xephi.authme.command.executable.authme.debug; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.LimboService; import fr.xephi.authme.datasource.CacheDataSource; import fr.xephi.authme.datasource.DataSource; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import org.bukkit.Location; import java.lang.reflect.Field; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/MySqlDefaultChanger.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/MySqlDefaultChanger.java index d4eb1d3c..dfb0dd25 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/MySqlDefaultChanger.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/MySqlDefaultChanger.java @@ -2,10 +2,10 @@ package fr.xephi.authme.command.executable.authme.debug; import ch.jalu.configme.properties.Property; import com.google.common.annotations.VisibleForTesting; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.datasource.MySQL; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.DebugSectionPermissions; import fr.xephi.authme.permission.PermissionNode; import fr.xephi.authme.settings.Settings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/TestEmailSender.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/TestEmailSender.java index 388a18af..1cce419f 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/TestEmailSender.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/authme/debug/TestEmailSender.java @@ -1,10 +1,10 @@ package fr.xephi.authme.command.executable.authme.debug; import ch.jalu.datasourcecolumns.data.DataSourceValue; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.mail.SendMailSsl; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.DebugSectionPermissions; import fr.xephi.authme.permission.PermissionNode; import fr.xephi.authme.util.StringUtils; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/email/EmailSetPasswordCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/email/EmailSetPasswordCommand.java index f3979adc..dae23c27 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/email/EmailSetPasswordCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/email/EmailSetPasswordCommand.java @@ -1,10 +1,10 @@ package fr.xephi.authme.command.executable.email; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.PlayerCommand; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.PasswordSecurity; import fr.xephi.authme.security.crypts.HashedPassword; import fr.xephi.authme.service.CommonService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/email/RecoverEmailCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/email/RecoverEmailCommand.java index ebb71133..fdb7dbc2 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/email/RecoverEmailCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/email/RecoverEmailCommand.java @@ -1,13 +1,13 @@ package fr.xephi.authme.command.executable.email; import ch.jalu.datasourcecolumns.data.DataSourceValue; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.PlayerCommand; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.mail.EmailService; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.service.CommonService; import fr.xephi.authme.service.PasswordRecoveryService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/register/RegisterCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/register/RegisterCommand.java index 29e98333..5889b55b 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/register/RegisterCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/register/RegisterCommand.java @@ -1,12 +1,12 @@ package fr.xephi.authme.command.executable.register; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.PlayerCommand; import fr.xephi.authme.data.captcha.RegistrationCaptchaManager; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.mail.EmailService; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.Management; import fr.xephi.authme.process.register.RegisterSecondaryArgument; import fr.xephi.authme.process.register.RegistrationType; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/ConfirmTotpCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/ConfirmTotpCommand.java index 85d7bc8a..8f728ae0 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/ConfirmTotpCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/ConfirmTotpCommand.java @@ -1,13 +1,13 @@ package fr.xephi.authme.command.executable.totp; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.PlayerCommand; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.message.MessageKey; import fr.xephi.authme.message.Messages; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.totp.GenerateTotpService; import fr.xephi.authme.security.totp.TotpAuthenticator.TotpGenerationResult; import org.bukkit.entity.Player; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/RemoveTotpCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/RemoveTotpCommand.java index 649f13e4..5be18574 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/RemoveTotpCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/RemoveTotpCommand.java @@ -1,13 +1,13 @@ package fr.xephi.authme.command.executable.totp; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.PlayerCommand; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.message.MessageKey; import fr.xephi.authme.message.Messages; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.totp.TotpAuthenticator; import org.bukkit.entity.Player; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/TotpCodeCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/TotpCodeCommand.java index 760b83ec..292279fb 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/TotpCodeCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/totp/TotpCodeCommand.java @@ -1,6 +1,6 @@ package fr.xephi.authme.command.executable.totp; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.PlayerCommand; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; @@ -10,7 +10,7 @@ import fr.xephi.authme.data.limbo.LimboService; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.message.MessageKey; import fr.xephi.authme.message.Messages; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.login.AsynchronousLogin; import fr.xephi.authme.security.totp.TotpAuthenticator; import org.bukkit.entity.Player; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/verification/VerificationCommand.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/verification/VerificationCommand.java index dc28c95f..87d17429 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/verification/VerificationCommand.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/command/executable/verification/VerificationCommand.java @@ -1,10 +1,10 @@ package fr.xephi.authme.command.executable.verification; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.command.PlayerCommand; import fr.xephi.authme.data.VerificationCodeManager; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.CommonService; import org.bukkit.entity.Player; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/AuthGroupHandler.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/AuthGroupHandler.java index 6e8c241a..485b5611 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/AuthGroupHandler.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/AuthGroupHandler.java @@ -1,8 +1,8 @@ package fr.xephi.authme.data.limbo; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.initialization.Reloadable; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PermissionsManager; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.PluginSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/LimboService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/LimboService.java index c8b46922..f9e83e8a 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/LimboService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/LimboService.java @@ -1,8 +1,8 @@ package fr.xephi.authme.data.limbo; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.persistence.LimboPersistence; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.SpawnLoader; import org.bukkit.Location; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/LimboServiceHelper.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/LimboServiceHelper.java index a3edb164..326213fe 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/LimboServiceHelper.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/LimboServiceHelper.java @@ -1,7 +1,7 @@ package fr.xephi.authme.data.limbo; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PermissionsManager; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.LimboSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/WalkFlySpeedRestoreType.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/WalkFlySpeedRestoreType.java index f4a24901..e312c37b 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/WalkFlySpeedRestoreType.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/WalkFlySpeedRestoreType.java @@ -1,7 +1,7 @@ package fr.xephi.authme.data.limbo; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import org.bukkit.entity.Player; /** diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/DistributedFilesPersistenceHandler.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/DistributedFilesPersistenceHandler.java index 9708ce88..da300d7e 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/DistributedFilesPersistenceHandler.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/DistributedFilesPersistenceHandler.java @@ -4,10 +4,10 @@ import com.google.common.io.Files; import com.google.common.reflect.TypeToken; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.LimboPlayer; import fr.xephi.authme.initialization.DataFolder; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.LimboSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/IndividualFilesPersistenceHandler.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/IndividualFilesPersistenceHandler.java index 9772ec06..60c90aea 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/IndividualFilesPersistenceHandler.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/IndividualFilesPersistenceHandler.java @@ -3,10 +3,10 @@ package fr.xephi.authme.data.limbo.persistence; import com.google.common.io.Files; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.LimboPlayer; import fr.xephi.authme.initialization.DataFolder; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.util.FileUtils; import org.bukkit.entity.Player; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/LimboPersistence.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/LimboPersistence.java index 844c9cdf..fc97b835 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/LimboPersistence.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/data/limbo/persistence/LimboPersistence.java @@ -1,10 +1,10 @@ package fr.xephi.authme.data.limbo.persistence; import ch.jalu.injector.factory.Factory; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.LimboPlayer; import fr.xephi.authme.initialization.SettingsDependent; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.LimboSettings; import org.bukkit.entity.Player; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java index 450fd051..b8c6ee23 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java @@ -10,10 +10,10 @@ import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.ThreadFactoryBuilder; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.crypts.HashedPassword; import fr.xephi.authme.settings.properties.DatabaseSettings; import fr.xephi.authme.util.Utils; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/H2.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/H2.java index 94b28f58..424908e5 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/H2.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/H2.java @@ -1,10 +1,10 @@ package fr.xephi.authme.datasource; import com.google.common.annotations.VisibleForTesting; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.columnshandler.AuthMeColumnsHandler; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.DatabaseSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/MySQL.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/MySQL.java index 9a1cf216..6e3aac00 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/MySQL.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/MySQL.java @@ -3,12 +3,12 @@ package fr.xephi.authme.datasource; import com.google.common.annotations.VisibleForTesting; import com.zaxxer.hikari.HikariDataSource; import com.zaxxer.hikari.pool.HikariPool.PoolInitializationException; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.columnshandler.AuthMeColumnsHandler; import fr.xephi.authme.datasource.mysqlextensions.MySqlExtension; import fr.xephi.authme.datasource.mysqlextensions.MySqlExtensionsFactory; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.DatabaseSettings; import fr.xephi.authme.settings.properties.HooksSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/MySqlMigrater.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/MySqlMigrater.java index fec564d5..d794ebba 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/MySqlMigrater.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/MySqlMigrater.java @@ -1,7 +1,7 @@ package fr.xephi.authme.datasource; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import java.sql.DatabaseMetaData; import java.sql.ResultSet; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/PostgreSqlDataSource.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/PostgreSqlDataSource.java index cc308934..b8531257 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/PostgreSqlDataSource.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/PostgreSqlDataSource.java @@ -3,12 +3,12 @@ package fr.xephi.authme.datasource; import com.google.common.annotations.VisibleForTesting; import com.zaxxer.hikari.HikariDataSource; import com.zaxxer.hikari.pool.HikariPool.PoolInitializationException; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.columnshandler.AuthMeColumnsHandler; import fr.xephi.authme.datasource.mysqlextensions.MySqlExtension; import fr.xephi.authme.datasource.mysqlextensions.MySqlExtensionsFactory; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.DatabaseSettings; import fr.xephi.authme.settings.properties.HooksSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SQLite.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SQLite.java index b261b5d5..9504fc40 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SQLite.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SQLite.java @@ -1,10 +1,10 @@ package fr.xephi.authme.datasource; import com.google.common.annotations.VisibleForTesting; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.columnshandler.AuthMeColumnsHandler; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.DatabaseSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SqLiteMigrater.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SqLiteMigrater.java index b4a2a577..816f8e7e 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SqLiteMigrater.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SqLiteMigrater.java @@ -1,8 +1,8 @@ package fr.xephi.authme.datasource; import com.google.common.io.Files; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.DatabaseSettings; import fr.xephi.authme.util.FileUtils; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SqlDataSourceUtils.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SqlDataSourceUtils.java index 1a936f02..54161e09 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SqlDataSourceUtils.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/SqlDataSourceUtils.java @@ -1,7 +1,7 @@ package fr.xephi.authme.datasource; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import java.sql.DatabaseMetaData; import java.sql.ResultSet; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/AbstractDataSourceConverter.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/AbstractDataSourceConverter.java index fdced2fa..551cdd28 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/AbstractDataSourceConverter.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/AbstractDataSourceConverter.java @@ -1,10 +1,10 @@ package fr.xephi.authme.datasource.converter; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.datasource.DataSourceType; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import org.bukkit.command.CommandSender; import java.util.ArrayList; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/CrazyLoginConverter.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/CrazyLoginConverter.java index a9197223..a7319019 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/CrazyLoginConverter.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/CrazyLoginConverter.java @@ -1,10 +1,10 @@ package fr.xephi.authme.datasource.converter; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.initialization.DataFolder; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.ConverterSettings; import org.bukkit.command.CommandSender; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/LoginSecurityConverter.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/LoginSecurityConverter.java index dbdce5df..aa8c064e 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/LoginSecurityConverter.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/LoginSecurityConverter.java @@ -1,11 +1,11 @@ package fr.xephi.authme.datasource.converter; import com.google.common.annotations.VisibleForTesting; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.initialization.DataFolder; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.ConverterSettings; import fr.xephi.authme.util.UuidUtils; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/RoyalAuthConverter.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/RoyalAuthConverter.java index ebb9080e..709d2004 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/RoyalAuthConverter.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/datasource/converter/RoyalAuthConverter.java @@ -1,10 +1,10 @@ package fr.xephi.authme.datasource.converter; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.DataSource; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import org.bukkit.OfflinePlayer; import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.FileConfiguration; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/DataSourceProvider.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/DataSourceProvider.java index 41e48f3f..78a1a68b 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/DataSourceProvider.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/DataSourceProvider.java @@ -1,7 +1,6 @@ package fr.xephi.authme.initialization; import com.alessiodp.libby.Library; -import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.datasource.CacheDataSource; import fr.xephi.authme.datasource.DataSource; @@ -12,7 +11,8 @@ import fr.xephi.authme.datasource.MySQL; import fr.xephi.authme.datasource.PostgreSqlDataSource; import fr.xephi.authme.datasource.SQLite; import fr.xephi.authme.datasource.mysqlextensions.MySqlExtensionsFactory; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.DatabaseSettings; @@ -82,10 +82,10 @@ public class DataSourceProvider implements Provider { break; case H2: Library h2 = Library.builder() - .groupId("com.h2database") - .artifactId("h2") - .version("2.2.224") - .build(); + .groupId("com.h2database") + .artifactId("h2") + .version("2.2.224") + .build(); libraryManager.addMavenCentral(); libraryManager.loadLibrary(h2); dataSource = new H2(settings, dataFolder); @@ -108,7 +108,7 @@ public class DataSourceProvider implements Provider { int accounts = dataSource.getAccountsRegistered(); if (accounts >= SQLITE_MAX_SIZE) { logger.warning("YOU'RE USING THE SQLITE DATABASE WITH " - + accounts + "+ ACCOUNTS; FOR BETTER PERFORMANCE, PLEASE UPGRADE TO MYSQL!!"); + + accounts + "+ ACCOUNTS; FOR BETTER PERFORMANCE, PLEASE UPGRADE TO MYSQL!!"); } }); } diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/OnStartupTasks.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/OnStartupTasks.java index 705f3bcc..71ecb4c6 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/OnStartupTasks.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/OnStartupTasks.java @@ -2,13 +2,13 @@ package fr.xephi.authme.initialization; import com.github.Anon8281.universalScheduler.UniversalRunnable; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.message.MessageKey; import fr.xephi.authme.message.Messages; -import fr.xephi.authme.output.ConsoleFilter; -import fr.xephi.authme.output.ConsoleLoggerFactory; -import fr.xephi.authme.output.Log4JFilter; +import fr.xephi.authme.logger.ConsoleFilter; +import fr.xephi.authme.logger.ConsoleLoggerFactory; +import fr.xephi.authme.logger.Log4JFilter; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.DatabaseSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/OnJoinVerifier.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/OnJoinVerifier.java index a617c2fa..c90e08cd 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/OnJoinVerifier.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/OnJoinVerifier.java @@ -1,12 +1,12 @@ package fr.xephi.authme.listener; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.initialization.Reloadable; import fr.xephi.authme.message.MessageKey; import fr.xephi.authme.message.Messages; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PermissionsManager; import fr.xephi.authme.permission.PlayerStatePermission; import fr.xephi.authme.service.AntiBotService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/ServerListener.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/ServerListener.java index 97cefa04..6a349125 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/ServerListener.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/ServerListener.java @@ -1,8 +1,8 @@ package fr.xephi.authme.listener; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.listener.protocollib.ProtocolLibService; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PermissionsManager; import fr.xephi.authme.service.PluginHookService; import fr.xephi.authme.settings.SpawnLoader; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/InventoryPacketAdapter.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/InventoryPacketAdapter.java index c83b992b..841ba5f7 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/InventoryPacketAdapter.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/InventoryPacketAdapter.java @@ -25,10 +25,10 @@ import com.comphenix.protocol.events.PacketContainer; import com.comphenix.protocol.events.PacketEvent; import com.comphenix.protocol.reflect.StructureModifier; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/ProtocolLibService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/ProtocolLibService.java index f0297b33..6205d888 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/ProtocolLibService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/ProtocolLibService.java @@ -2,11 +2,11 @@ package fr.xephi.authme.listener.protocollib; import ch.jalu.injector.annotations.NoFieldScan; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.initialization.SettingsDependent; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.PluginSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/TabCompletePacketAdapter.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/TabCompletePacketAdapter.java index 3f0bb316..1ab1a887 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/TabCompletePacketAdapter.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/listener/protocollib/TabCompletePacketAdapter.java @@ -7,9 +7,9 @@ import com.comphenix.protocol.events.PacketAdapter; import com.comphenix.protocol.events.PacketEvent; import com.comphenix.protocol.reflect.FieldAccessException; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerCache; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; class TabCompletePacketAdapter extends PacketAdapter { diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/AbstractMessageFileHandler.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/AbstractMessageFileHandler.java index 821180d3..758e2f6f 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/AbstractMessageFileHandler.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/AbstractMessageFileHandler.java @@ -1,11 +1,11 @@ package fr.xephi.authme.message; import com.google.common.annotations.VisibleForTesting; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.configruation.Configuration; import fr.xephi.authme.initialization.DataFolder; import fr.xephi.authme.initialization.Reloadable; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.PluginSettings; import fr.xephi.authme.util.FileUtils; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/HelpMessagesFileHandler.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/HelpMessagesFileHandler.java index aa756fc8..acb777a6 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/HelpMessagesFileHandler.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/HelpMessagesFileHandler.java @@ -1,8 +1,8 @@ package fr.xephi.authme.message; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.configruation.Configuration; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.util.FileUtils; import javax.inject.Inject; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/Messages.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/Messages.java index 0d7ec317..bafb2089 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/Messages.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/Messages.java @@ -1,9 +1,9 @@ package fr.xephi.authme.message; import com.google.common.collect.ImmutableMap; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.mail.EmailService; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.util.expiring.Duration; import fr.xephi.authme.util.message.I18NUtils; import fr.xephi.authme.util.message.MiniMessageUtils; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/MessagesFileHandler.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/MessagesFileHandler.java index b62be93f..f5414c5b 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/MessagesFileHandler.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/MessagesFileHandler.java @@ -1,8 +1,8 @@ package fr.xephi.authme.message; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.message.updater.MessageUpdater; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import javax.inject.Inject; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/updater/JarMessageSource.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/updater/JarMessageSource.java index 73075f4e..d5a0d2dd 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/updater/JarMessageSource.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/updater/JarMessageSource.java @@ -2,8 +2,8 @@ package fr.xephi.authme.message.updater; import ch.jalu.configme.properties.Property; import ch.jalu.configme.resource.PropertyReader; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.util.FileUtils; import java.io.IOException; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/updater/MessageUpdater.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/updater/MessageUpdater.java index f3f718c8..bb311e3c 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/updater/MessageUpdater.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/message/updater/MessageUpdater.java @@ -9,9 +9,9 @@ import ch.jalu.configme.resource.PropertyReader; import ch.jalu.configme.resource.PropertyResource; import com.google.common.collect.ImmutableMap; import com.google.common.io.Files; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.util.FileUtils; import java.io.File; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/permission/PermissionsManager.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/permission/PermissionsManager.java index 7399d0ca..f4771c91 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/permission/PermissionsManager.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/permission/PermissionsManager.java @@ -1,10 +1,10 @@ package fr.xephi.authme.permission; import com.google.common.annotations.VisibleForTesting; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.UserGroup; import fr.xephi.authme.initialization.Reloadable; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.handlers.LuckPermsHandler; import fr.xephi.authme.permission.handlers.PermissionHandler; import fr.xephi.authme.permission.handlers.PermissionHandlerException; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/permission/handlers/LuckPermsHandler.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/permission/handlers/LuckPermsHandler.java index 3e786f33..4dba0e99 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/permission/handlers/LuckPermsHandler.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/permission/handlers/LuckPermsHandler.java @@ -1,8 +1,8 @@ package fr.xephi.authme.permission.handlers; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.UserGroup; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PermissionNode; import fr.xephi.authme.permission.PermissionsSystemType; import net.luckperms.api.LuckPerms; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/changepassword/AsyncChangePassword.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/changepassword/AsyncChangePassword.java index aa45d228..6e6c75e0 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/changepassword/AsyncChangePassword.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/changepassword/AsyncChangePassword.java @@ -1,11 +1,11 @@ package fr.xephi.authme.process.changepassword; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.AsynchronousProcess; import fr.xephi.authme.security.PasswordSecurity; import fr.xephi.authme.security.crypts.HashedPassword; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/email/AsyncAddEmail.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/email/AsyncAddEmail.java index 4001420c..e9724946 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/email/AsyncAddEmail.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/email/AsyncAddEmail.java @@ -1,12 +1,12 @@ package fr.xephi.authme.process.email; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.events.EmailChangedEvent; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.AsynchronousProcess; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.service.CommonService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/email/AsyncChangeEmail.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/email/AsyncChangeEmail.java index 74d9c39b..a6cefc33 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/email/AsyncChangeEmail.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/email/AsyncChangeEmail.java @@ -1,12 +1,12 @@ package fr.xephi.authme.process.email; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.events.EmailChangedEvent; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.AsynchronousProcess; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.service.CommonService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java index 424c4989..5c42aa03 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java @@ -1,12 +1,12 @@ package fr.xephi.authme.process.join; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.ProxySessionManager; import fr.xephi.authme.data.limbo.LimboService; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.events.ProtectInventoryEvent; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PlayerStatePermission; import fr.xephi.authme.process.AsynchronousProcess; import fr.xephi.authme.process.login.AsynchronousLogin; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java index 988124d9..02a7c7d4 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/login/AsynchronousLogin.java @@ -1,7 +1,7 @@ package fr.xephi.authme.process.login; import com.google.common.annotations.VisibleForTesting; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.TempbanManager; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; @@ -14,7 +14,7 @@ import fr.xephi.authme.events.AuthMeAsyncPreLoginEvent; import fr.xephi.authme.events.FailedLoginEvent; import fr.xephi.authme.mail.EmailService; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.AdminPermission; import fr.xephi.authme.permission.PlayerPermission; import fr.xephi.authme.permission.PlayerStatePermission; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/logout/ProcessSyncPlayerLogout.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/logout/ProcessSyncPlayerLogout.java index 96865e21..6e5a75d9 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/logout/ProcessSyncPlayerLogout.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/logout/ProcessSyncPlayerLogout.java @@ -1,11 +1,11 @@ package fr.xephi.authme.process.logout; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.LimboService; import fr.xephi.authme.events.LogoutEvent; import fr.xephi.authme.listener.protocollib.ProtocolLibService; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.SynchronousProcess; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.service.CommonService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/register/ProcessSyncEmailRegister.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/register/ProcessSyncEmailRegister.java index 0fe19acf..dbe76858 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/register/ProcessSyncEmailRegister.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/register/ProcessSyncEmailRegister.java @@ -1,10 +1,10 @@ package fr.xephi.authme.process.register; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.LimboService; import fr.xephi.authme.events.RegisterEvent; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.SynchronousProcess; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.service.CommonService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/register/ProcessSyncPasswordRegister.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/register/ProcessSyncPasswordRegister.java index f68ba015..be32b0e6 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/register/ProcessSyncPasswordRegister.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/register/ProcessSyncPasswordRegister.java @@ -1,10 +1,10 @@ package fr.xephi.authme.process.register; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.limbo.LimboService; import fr.xephi.authme.events.RegisterEvent; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.SynchronousProcess; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.service.CommonService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java index caecd295..ff8fc20a 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java @@ -1,6 +1,6 @@ package fr.xephi.authme.process.unregister; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.data.limbo.LimboService; @@ -8,7 +8,7 @@ import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.events.UnregisterByAdminEvent; import fr.xephi.authme.events.UnregisterByPlayerEvent; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.AsynchronousProcess; import fr.xephi.authme.security.PasswordSecurity; import fr.xephi.authme.service.BukkitService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/BackupService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/BackupService.java index 3e570c3d..1e04f599 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/BackupService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/BackupService.java @@ -1,10 +1,10 @@ package fr.xephi.authme.service; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.datasource.DataSourceType; import fr.xephi.authme.initialization.DataFolder; import fr.xephi.authme.mail.EmailService; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.BackupSettings; import fr.xephi.authme.settings.properties.DatabaseSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/GeoIpService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/GeoIpService.java index bf7252ff..28b30f0f 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/GeoIpService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/GeoIpService.java @@ -7,9 +7,9 @@ import com.maxmind.db.Reader.FileMode; import com.maxmind.db.cache.CHMCache; import com.maxmind.db.model.Country; import com.maxmind.db.model.CountryResponse; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.initialization.DataFolder; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.util.InternetProtocolUtils; import javax.inject.Inject; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/MigrationService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/MigrationService.java index de8d88a7..996e55e2 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/MigrationService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/MigrationService.java @@ -1,9 +1,9 @@ package fr.xephi.authme.service; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.DataSource; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.HashAlgorithm; import fr.xephi.authme.security.crypts.HashedPassword; import fr.xephi.authme.security.crypts.Sha256; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/PasswordRecoveryService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/PasswordRecoveryService.java index 01f96300..632c45f5 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/PasswordRecoveryService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/PasswordRecoveryService.java @@ -1,13 +1,13 @@ package fr.xephi.authme.service; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.initialization.HasCleanup; import fr.xephi.authme.initialization.Reloadable; import fr.xephi.authme.mail.EmailService; import fr.xephi.authme.message.MessageKey; import fr.xephi.authme.message.Messages; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.PasswordSecurity; import fr.xephi.authme.security.crypts.HashedPassword; import fr.xephi.authme.settings.properties.SecuritySettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/PluginHookService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/PluginHookService.java index 3615aa73..9af7f6b0 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/PluginHookService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/PluginHookService.java @@ -4,8 +4,8 @@ import ch.jalu.injector.annotations.NoFieldScan; import com.earth2me.essentials.Essentials; import com.onarandombox.MultiverseCore.MultiverseCore; import com.onarandombox.MultiverseCore.api.MVWorldManager; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Player; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/SessionService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/SessionService.java index b4092b45..70589f77 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/SessionService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/SessionService.java @@ -1,12 +1,12 @@ package fr.xephi.authme.service; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.events.RestoreSessionEvent; import fr.xephi.authme.initialization.Reloadable; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.properties.PluginSettings; import fr.xephi.authme.util.PlayerUtils; import org.bukkit.entity.Player; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/TeleportationService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/TeleportationService.java index c50b0129..20ac1c44 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/TeleportationService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/TeleportationService.java @@ -1,6 +1,6 @@ package fr.xephi.authme.service; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.auth.PlayerAuth; import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.data.limbo.LimboPlayer; @@ -10,7 +10,7 @@ import fr.xephi.authme.events.AuthMeTeleportEvent; import fr.xephi.authme.events.FirstSpawnTeleportEvent; import fr.xephi.authme.events.SpawnTeleportEvent; import fr.xephi.authme.initialization.Reloadable; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.SpawnLoader; import fr.xephi.authme.settings.properties.RestrictionSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/ValidationService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/ValidationService.java index fca9eb53..8a47ca30 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/ValidationService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/ValidationService.java @@ -4,11 +4,11 @@ import ch.jalu.configme.properties.Property; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.datasource.DataSource; import fr.xephi.authme.initialization.Reloadable; import fr.xephi.authme.message.MessageKey; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PermissionsManager; import fr.xephi.authme.permission.PlayerStatePermission; import fr.xephi.authme.security.HashUtils; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/bungeecord/BungeeReceiver.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/bungeecord/BungeeReceiver.java index 05c7c944..701393a4 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/bungeecord/BungeeReceiver.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/bungeecord/BungeeReceiver.java @@ -3,10 +3,10 @@ package fr.xephi.authme.service.bungeecord; import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.ProxySessionManager; import fr.xephi.authme.initialization.SettingsDependent; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.Management; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.settings.Settings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/bungeecord/BungeeSender.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/bungeecord/BungeeSender.java index 3d43605b..c1f93603 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/bungeecord/BungeeSender.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/bungeecord/BungeeSender.java @@ -3,9 +3,9 @@ package fr.xephi.authme.service.bungeecord; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.initialization.SettingsDependent; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.HooksSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/velocity/VelocityReceiver.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/velocity/VelocityReceiver.java index caa04e5f..4c8c36e8 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/velocity/VelocityReceiver.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/velocity/VelocityReceiver.java @@ -3,10 +3,10 @@ package fr.xephi.authme.service.velocity; import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.data.ProxySessionManager; import fr.xephi.authme.initialization.SettingsDependent; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.process.Management; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.settings.Settings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/velocity/VelocitySender.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/velocity/VelocitySender.java index 16a0f2cb..eec77187 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/velocity/VelocitySender.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/service/velocity/VelocitySender.java @@ -3,9 +3,9 @@ package fr.xephi.authme.service.velocity; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.initialization.SettingsDependent; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.service.bungeecord.MessageType; import fr.xephi.authme.settings.Settings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SettingsMigrationService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SettingsMigrationService.java index fe035a8b..bd28b7a5 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SettingsMigrationService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SettingsMigrationService.java @@ -5,11 +5,11 @@ import ch.jalu.configme.migration.PlainMigrationService; import ch.jalu.configme.properties.Property; import ch.jalu.configme.properties.convertresult.PropertyValue; import ch.jalu.configme.resource.PropertyReader; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.datasource.DataSourceType; import fr.xephi.authme.initialization.DataFolder; -import fr.xephi.authme.output.ConsoleLoggerFactory; -import fr.xephi.authme.output.LogLevel; +import fr.xephi.authme.logger.ConsoleLoggerFactory; +import fr.xephi.authme.logger.LogLevel; import fr.xephi.authme.process.register.RegisterSecondaryArgument; import fr.xephi.authme.process.register.RegistrationType; import fr.xephi.authme.security.HashAlgorithm; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SettingsWarner.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SettingsWarner.java index c63ffe71..8626e7a4 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SettingsWarner.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SettingsWarner.java @@ -1,8 +1,8 @@ package fr.xephi.authme.settings; import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.HashAlgorithm; import fr.xephi.authme.security.crypts.Argon2; import fr.xephi.authme.service.BukkitService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SpawnLoader.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SpawnLoader.java index 47e9711d..5ddd041a 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SpawnLoader.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/SpawnLoader.java @@ -1,9 +1,9 @@ package fr.xephi.authme.settings; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.initialization.DataFolder; import fr.xephi.authme.initialization.Reloadable; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.service.PluginHookService; import fr.xephi.authme.settings.properties.HooksSettings; import fr.xephi.authme.settings.properties.RestrictionSettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/AuthMeSettingsRetriever.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/AuthMeSettingsRetriever.java index c3793485..9ddf9aa1 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/AuthMeSettingsRetriever.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/AuthMeSettingsRetriever.java @@ -20,9 +20,9 @@ public final class AuthMeSettingsRetriever { */ public static ConfigurationData buildConfigurationData() { return ConfigurationDataBuilder.createConfiguration( - DatabaseSettings.class, PluginSettings.class, RestrictionSettings.class, - EmailSettings.class, HooksSettings.class, ProtectionSettings.class, - PurgeSettings.class, SecuritySettings.class, RegistrationSettings.class, - LimboSettings.class, BackupSettings.class, ConverterSettings.class); + DatabaseSettings.class, PluginSettings.class, RestrictionSettings.class, + EmailSettings.class, HooksSettings.class, ProtectionSettings.class, + PurgeSettings.class, SecuritySettings.class, RegistrationSettings.class, + LimboSettings.class, BackupSettings.class, ConverterSettings.class); } } diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/ConverterSettings.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/ConverterSettings.java index 2f677827..a2ed7999 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/ConverterSettings.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/ConverterSettings.java @@ -8,29 +8,30 @@ import ch.jalu.configme.properties.Property; import static ch.jalu.configme.properties.PropertyInitializer.newProperty; public final class ConverterSettings implements SettingsHolder { + @Comment("CrazyLogin database file name") public static final Property CRAZYLOGIN_FILE_NAME = - newProperty("Converter.CrazyLogin.fileName", "accounts.db"); + newProperty("Converter.CrazyLogin.fileName", "accounts.db"); @Comment("LoginSecurity: convert from SQLite; if false we use MySQL") public static final Property LOGINSECURITY_USE_SQLITE = - newProperty("Converter.loginSecurity.useSqlite", true); + newProperty("Converter.loginSecurity.useSqlite", true); @Comment("LoginSecurity MySQL: database host") public static final Property LOGINSECURITY_MYSQL_HOST = - newProperty("Converter.loginSecurity.mySql.host", ""); + newProperty("Converter.loginSecurity.mySql.host", ""); @Comment("LoginSecurity MySQL: database name") public static final Property LOGINSECURITY_MYSQL_DATABASE = - newProperty("Converter.loginSecurity.mySql.database", ""); + newProperty("Converter.loginSecurity.mySql.database", ""); @Comment("LoginSecurity MySQL: database user") public static final Property LOGINSECURITY_MYSQL_USER = - newProperty("Converter.loginSecurity.mySql.user", ""); + newProperty("Converter.loginSecurity.mySql.user", ""); @Comment("LoginSecurity MySQL: password for database user") public static final Property LOGINSECURITY_MYSQL_PASSWORD = - newProperty("Converter.loginSecurity.mySql.password", ""); + newProperty("Converter.loginSecurity.mySql.password", ""); private ConverterSettings() { } @@ -38,6 +39,6 @@ public final class ConverterSettings implements SettingsHolder { @Override public void registerComments(CommentsConfiguration conf) { conf.setComment("Converter", - "Converter settings: see https://github.com/AuthMe/AuthMeReloaded/wiki/Converters"); + "Converter settings: see https://github.com/AuthMe/AuthMeReloaded/wiki/Converters"); } } diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/DatabaseSettings.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/DatabaseSettings.java index 6103183d..ee658eda 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/DatabaseSettings.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/DatabaseSettings.java @@ -10,161 +10,161 @@ import static ch.jalu.configme.properties.PropertyInitializer.newProperty; public final class DatabaseSettings implements SettingsHolder { @Comment({"What type of database do you want to use?", - "Valid values: H2, SQLITE, MARIADB, MYSQL, POSTGRESQL"}) + "Valid values: H2, SQLITE, MARIADB, MYSQL, POSTGRESQL"}) public static final Property BACKEND = - newProperty(DataSourceType.class, "DataSource.backend", DataSourceType.SQLITE); + newProperty(DataSourceType.class, "DataSource.backend", DataSourceType.SQLITE); @Comment({"Enable the database caching system, should be disabled on bungeecord environments", - "or when a website integration is being used."}) + "or when a website integration is being used."}) public static final Property USE_CACHING = - newProperty("DataSource.caching", true); + newProperty("DataSource.caching", true); @Comment("Should we try to use VirtualThreads(Java 21+) for database cache loader?") public static final Property USE_VIRTUAL_THREADS = - newProperty("DataSource.useVirtualThreadsCache", false); + newProperty("DataSource.useVirtualThreadsCache", false); @Comment("Database host address") public static final Property MYSQL_HOST = - newProperty("DataSource.mySQLHost", "127.0.0.1"); + newProperty("DataSource.mySQLHost", "127.0.0.1"); @Comment("Database port") public static final Property MYSQL_PORT = - newProperty("DataSource.mySQLPort", "3306"); + newProperty("DataSource.mySQLPort", "3306"); @Comment({"Replacement of Mysql's useSsl (for MariaDB only).", - "- disable: No SSL", - "- trust: Trust blindly (no validation)", - "- verify_ca: Encryption, certificates validation, BUT no hostname verification", - "- verify_full: Encryption, certificate validation and hostname validation", - "Read more: https://bit.ly/mariadb-sslmode"}) + "- disable: No SSL", + "- trust: Trust blindly (no validation)", + "- verify_ca: Encryption, certificates validation, BUT no hostname verification", + "- verify_full: Encryption, certificate validation and hostname validation", + "Read more: https://bit.ly/mariadb-sslmode"}) public static final Property MARIADB_SSL_MODE = - newProperty("DataSource.MariaDbSslMode", "disabled"); + newProperty("DataSource.MariaDbSslMode", "disabled"); @Comment({"Connect to MySQL database over SSL", - "If you're using MariaDB, use sslMode instead"}) + "If you're using MariaDB, use sslMode instead"}) public static final Property MYSQL_USE_SSL = - newProperty("DataSource.mySQLUseSSL", true); + newProperty("DataSource.mySQLUseSSL", true); @Comment({"Verification of server's certificate.", - "We would not recommend to set this option to false.", - "Set this option to false at your own risk if and only if you know what you're doing"}) + "We would not recommend to set this option to false.", + "Set this option to false at your own risk if and only if you know what you're doing"}) public static final Property MYSQL_CHECK_SERVER_CERTIFICATE = - newProperty( "DataSource.mySQLCheckServerCertificate", true); + newProperty("DataSource.mySQLCheckServerCertificate", true); @Comment({"Authorize client to retrieve RSA server public key.", - "Advanced option, ignore if you don't know what it means.", - "If you are using MariaDB, use MariaDbSslMode instead."}) + "Advanced option, ignore if you don't know what it means.", + "If you are using MariaDB, use MariaDbSslMode instead."}) public static final Property MYSQL_ALLOW_PUBLIC_KEY_RETRIEVAL = - newProperty( "DataSource.mySQLAllowPublicKeyRetrieval", true); + newProperty("DataSource.mySQLAllowPublicKeyRetrieval", true); @Comment("Username to connect to the MySQL database") public static final Property MYSQL_USERNAME = - newProperty("DataSource.mySQLUsername", "authme"); + newProperty("DataSource.mySQLUsername", "authme"); @Comment("Password to connect to the MySQL database") public static final Property MYSQL_PASSWORD = - newProperty("DataSource.mySQLPassword", "12345"); + newProperty("DataSource.mySQLPassword", "12345"); @Comment("Database Name, use with converters or as SQLITE database name") public static final Property MYSQL_DATABASE = - newProperty("DataSource.mySQLDatabase", "authme"); + newProperty("DataSource.mySQLDatabase", "authme"); @Comment("Table of the database") public static final Property MYSQL_TABLE = - newProperty("DataSource.mySQLTablename", "authme"); + newProperty("DataSource.mySQLTablename", "authme"); @Comment("Column of IDs to sort data") public static final Property MYSQL_COL_ID = - newProperty("DataSource.mySQLColumnId", "id"); + newProperty("DataSource.mySQLColumnId", "id"); @Comment("Column for storing or checking players nickname") public static final Property MYSQL_COL_NAME = - newProperty("DataSource.mySQLColumnName", "username"); + newProperty("DataSource.mySQLColumnName", "username"); @Comment("Column for storing or checking players RealName") public static final Property MYSQL_COL_REALNAME = - newProperty("DataSource.mySQLRealName", "realname"); + newProperty("DataSource.mySQLRealName", "realname"); @Comment("Column for storing players passwords") public static final Property MYSQL_COL_PASSWORD = - newProperty("DataSource.mySQLColumnPassword", "password"); + newProperty("DataSource.mySQLColumnPassword", "password"); @Comment("Column for storing players passwords salts") public static final Property MYSQL_COL_SALT = - newProperty("DataSource.mySQLColumnSalt", ""); + newProperty("DataSource.mySQLColumnSalt", ""); @Comment("Column for storing players emails") public static final Property MYSQL_COL_EMAIL = - newProperty("DataSource.mySQLColumnEmail", "email"); + newProperty("DataSource.mySQLColumnEmail", "email"); @Comment("Column for storing if a player is logged in or not") public static final Property MYSQL_COL_ISLOGGED = - newProperty("DataSource.mySQLColumnLogged", "isLogged"); + newProperty("DataSource.mySQLColumnLogged", "isLogged"); @Comment("Column for storing if a player has a valid session or not") public static final Property MYSQL_COL_HASSESSION = - newProperty("DataSource.mySQLColumnHasSession", "hasSession"); + newProperty("DataSource.mySQLColumnHasSession", "hasSession"); @Comment("Column for storing a player's TOTP key (for two-factor authentication)") public static final Property MYSQL_COL_TOTP_KEY = - newProperty("DataSource.mySQLtotpKey", "totp"); + newProperty("DataSource.mySQLtotpKey", "totp"); @Comment("Column for storing the player's last IP") public static final Property MYSQL_COL_LAST_IP = - newProperty("DataSource.mySQLColumnIp", "ip"); + newProperty("DataSource.mySQLColumnIp", "ip"); @Comment("Column for storing players lastlogins") public static final Property MYSQL_COL_LASTLOGIN = - newProperty("DataSource.mySQLColumnLastLogin", "lastlogin"); + newProperty("DataSource.mySQLColumnLastLogin", "lastlogin"); @Comment("Column storing the registration date") public static final Property MYSQL_COL_REGISTER_DATE = - newProperty("DataSource.mySQLColumnRegisterDate", "regdate"); + newProperty("DataSource.mySQLColumnRegisterDate", "regdate"); @Comment("Column for storing the IP address at the time of registration") public static final Property MYSQL_COL_REGISTER_IP = - newProperty("DataSource.mySQLColumnRegisterIp", "regip"); + newProperty("DataSource.mySQLColumnRegisterIp", "regip"); @Comment("Column for storing player LastLocation - X") public static final Property MYSQL_COL_LASTLOC_X = - newProperty("DataSource.mySQLlastlocX", "x"); + newProperty("DataSource.mySQLlastlocX", "x"); @Comment("Column for storing player LastLocation - Y") public static final Property MYSQL_COL_LASTLOC_Y = - newProperty("DataSource.mySQLlastlocY", "y"); + newProperty("DataSource.mySQLlastlocY", "y"); @Comment("Column for storing player LastLocation - Z") public static final Property MYSQL_COL_LASTLOC_Z = - newProperty("DataSource.mySQLlastlocZ", "z"); + newProperty("DataSource.mySQLlastlocZ", "z"); @Comment("Column for storing player LastLocation - World Name") public static final Property MYSQL_COL_LASTLOC_WORLD = - newProperty("DataSource.mySQLlastlocWorld", "world"); + newProperty("DataSource.mySQLlastlocWorld", "world"); @Comment("Column for storing player LastLocation - Yaw") public static final Property MYSQL_COL_LASTLOC_YAW = - newProperty("DataSource.mySQLlastlocYaw", "yaw"); + newProperty("DataSource.mySQLlastlocYaw", "yaw"); @Comment("Column for storing player LastLocation - Pitch") public static final Property MYSQL_COL_LASTLOC_PITCH = - newProperty("DataSource.mySQLlastlocPitch", "pitch"); + newProperty("DataSource.mySQLlastlocPitch", "pitch"); @Comment("Column for storing players uuids (optional)") public static final Property MYSQL_COL_PLAYER_UUID = - newProperty( "DataSource.mySQLPlayerUUID", "" ); + newProperty("DataSource.mySQLPlayerUUID", ""); @Comment("Column for storing players groups") public static final Property MYSQL_COL_GROUP = - newProperty("ExternalBoardOptions.mySQLColumnGroup", ""); + newProperty("ExternalBoardOptions.mySQLColumnGroup", ""); @Comment("Overrides the size of the DB Connection Pool, default = 10") public static final Property MYSQL_POOL_SIZE = - newProperty("DataSource.poolSize", 10); + newProperty("DataSource.poolSize", 10); @Comment({"The maximum lifetime of a connection in the pool, default = 1800 seconds", - "You should set this at least 30 seconds less than mysql server wait_timeout"}) + "You should set this at least 30 seconds less than mysql server wait_timeout"}) public static final Property MYSQL_CONNECTION_MAX_LIFETIME = - newProperty("DataSource.maxLifetime", 1800); + newProperty("DataSource.maxLifetime", 1800); private DatabaseSettings() { } diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java index 08c91c6a..b464c274 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java @@ -13,86 +13,86 @@ public final class HooksSettings implements SettingsHolder { @Comment("Do we need to hook with multiverse for spawn checking?") public static final Property MULTIVERSE = - newProperty("Hooks.multiverse", true); + newProperty("Hooks.multiverse", true); @Comment("Do we need to hook with BungeeCord?") public static final Property BUNGEECORD = - newProperty("Hooks.bungeecord", false); + newProperty("Hooks.bungeecord", false); @Comment("Do we need to hook with Velocity?") public static final Property VELOCITY = - newProperty("Hooks.velocity", false); + newProperty("Hooks.velocity", false); @Comment({"How many ticks should we wait before sending login info to proxy?", - "Change this to higher if your player has high ping.", - "See: https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/"}) + "Change this to higher if your player has high ping.", + "See: https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/"}) public static final Property PROXY_SEND_DELAY = - newProperty("Hooks.proxySendDelay", 10L); + newProperty("Hooks.proxySendDelay", 10L); @Comment({"Hook into floodgate.", - "This must be true if you want to use other bedrock features." + "This must be true if you want to use other bedrock features." }) public static final Property HOOK_FLOODGATE_PLAYER = - newProperty("Hooks.floodgate", false); + newProperty("Hooks.floodgate", false); @Comment("Allow bedrock players join without check isValidName?") public static final Property IGNORE_BEDROCK_NAME_CHECK = - newProperty("Hooks.ignoreBedrockNameCheck", true); + newProperty("Hooks.ignoreBedrockNameCheck", true); @Comment("Send player to this BungeeCord server after register/login") public static final Property BUNGEECORD_SERVER = - newProperty("Hooks.sendPlayerTo", ""); + newProperty("Hooks.sendPlayerTo", ""); @Comment("Do we need to disable Essentials SocialSpy on join?") public static final Property DISABLE_SOCIAL_SPY = - newProperty("Hooks.disableSocialSpy", false); + newProperty("Hooks.disableSocialSpy", false); @Comment("Do we need to force /motd Essentials command on join?") public static final Property USE_ESSENTIALS_MOTD = - newProperty("Hooks.useEssentialsMotd", false); + newProperty("Hooks.useEssentialsMotd", false); @Comment({ - "-1 means disabled. If you want that only activated players", - "can log into your server, you can set here the group number", - "of unactivated users, needed for some forum/CMS support"}) + "-1 means disabled. If you want that only activated players", + "can log into your server, you can set here the group number", + "of unactivated users, needed for some forum/CMS support"}) public static final Property NON_ACTIVATED_USERS_GROUP = - newProperty("ExternalBoardOptions.nonActivedUserGroup", -1); + newProperty("ExternalBoardOptions.nonActivedUserGroup", -1); @Comment("Other MySQL columns where we need to put the username (case-sensitive)") public static final Property> MYSQL_OTHER_USERNAME_COLS = - newListProperty("ExternalBoardOptions.mySQLOtherUsernameColumns"); + newListProperty("ExternalBoardOptions.mySQLOtherUsernameColumns"); @Comment("How much log2 rounds needed in BCrypt (do not change if you do not know what it does)") public static final Property BCRYPT_LOG2_ROUND = - newProperty("ExternalBoardOptions.bCryptLog2Round", 12); + newProperty("ExternalBoardOptions.bCryptLog2Round", 12); @Comment("phpBB table prefix defined during the phpBB installation process") public static final Property PHPBB_TABLE_PREFIX = - newProperty("ExternalBoardOptions.phpbbTablePrefix", "phpbb_"); + newProperty("ExternalBoardOptions.phpbbTablePrefix", "phpbb_"); @Comment("phpBB activated group ID; 2 is the default registered group defined by phpBB") public static final Property PHPBB_ACTIVATED_GROUP_ID = - newProperty("ExternalBoardOptions.phpbbActivatedGroupId", 2); + newProperty("ExternalBoardOptions.phpbbActivatedGroupId", 2); @Comment("IP Board table prefix defined during the IP Board installation process") public static final Property IPB_TABLE_PREFIX = - newProperty("ExternalBoardOptions.IPBTablePrefix", "ipb_"); + newProperty("ExternalBoardOptions.IPBTablePrefix", "ipb_"); @Comment("IP Board default group ID; 3 is the default registered group defined by IP Board") public static final Property IPB_ACTIVATED_GROUP_ID = - newProperty("ExternalBoardOptions.IPBActivatedGroupId", 3); + newProperty("ExternalBoardOptions.IPBActivatedGroupId", 3); @Comment("Xenforo table prefix defined during the Xenforo installation process") public static final Property XF_TABLE_PREFIX = - newProperty("ExternalBoardOptions.XFTablePrefix", "xf_"); + newProperty("ExternalBoardOptions.XFTablePrefix", "xf_"); @Comment("XenForo default group ID; 2 is the default registered group defined by Xenforo") public static final Property XF_ACTIVATED_GROUP_ID = - newProperty("ExternalBoardOptions.XFActivatedGroupId", 2); + newProperty("ExternalBoardOptions.XFActivatedGroupId", 2); @Comment("Wordpress prefix defined during WordPress installation") public static final Property WORDPRESS_TABLE_PREFIX = - newProperty("ExternalBoardOptions.wordpressTablePrefix", "wp_"); + newProperty("ExternalBoardOptions.wordpressTablePrefix", "wp_"); private HooksSettings() { diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/LimboSettings.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/LimboSettings.java index 309b6923..3e77d197 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/LimboSettings.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/LimboSettings.java @@ -17,54 +17,54 @@ import static ch.jalu.configme.properties.PropertyInitializer.newProperty; public final class LimboSettings implements SettingsHolder { @Comment({ - "Besides storing the data in memory, you can define if/how the data should be persisted", - "on disk. This is useful in case of a server crash, so next time the server starts we can", - "properly restore things like OP status, ability to fly, and walk/fly speed.", - "DISABLED: no disk storage,", - "INDIVIDUAL_FILES: each player data in its own file,", - "DISTRIBUTED_FILES: distributes players into different files based on their UUID, see below" + "Besides storing the data in memory, you can define if/how the data should be persisted", + "on disk. This is useful in case of a server crash, so next time the server starts we can", + "properly restore things like OP status, ability to fly, and walk/fly speed.", + "DISABLED: no disk storage,", + "INDIVIDUAL_FILES: each player data in its own file,", + "DISTRIBUTED_FILES: distributes players into different files based on their UUID, see below" }) public static final Property LIMBO_PERSISTENCE_TYPE = - newProperty(LimboPersistenceType.class, "limbo.persistence.type", LimboPersistenceType.INDIVIDUAL_FILES); + newProperty(LimboPersistenceType.class, "limbo.persistence.type", LimboPersistenceType.INDIVIDUAL_FILES); @Comment({ - "This setting only affects DISTRIBUTED_FILES persistence. The distributed file", - "persistence attempts to reduce the number of files by distributing players into various", - "buckets based on their UUID. This setting defines into how many files the players should", - "be distributed. Possible values: ONE, FOUR, EIGHT, SIXTEEN, THIRTY_TWO, SIXTY_FOUR,", - "ONE_TWENTY for 128, TWO_FIFTY for 256.", - "For example, if you expect 100 non-logged in players, setting to SIXTEEN will average", - "6.25 players per file (100 / 16).", - "Note: if you change this setting all data will be migrated. If you have a lot of data,", - "change this setting only on server restart, not with /authme reload." + "This setting only affects DISTRIBUTED_FILES persistence. The distributed file", + "persistence attempts to reduce the number of files by distributing players into various", + "buckets based on their UUID. This setting defines into how many files the players should", + "be distributed. Possible values: ONE, FOUR, EIGHT, SIXTEEN, THIRTY_TWO, SIXTY_FOUR,", + "ONE_TWENTY for 128, TWO_FIFTY for 256.", + "For example, if you expect 100 non-logged in players, setting to SIXTEEN will average", + "6.25 players per file (100 / 16).", + "Note: if you change this setting all data will be migrated. If you have a lot of data,", + "change this setting only on server restart, not with /authme reload." }) public static final Property DISTRIBUTION_SIZE = - newProperty(SegmentSize.class, "limbo.persistence.distributionSize", SegmentSize.SIXTEEN); + newProperty(SegmentSize.class, "limbo.persistence.distributionSize", SegmentSize.SIXTEEN); @Comment({ - "Whether the player is allowed to fly: RESTORE, ENABLE, DISABLE, NOTHING.", - "RESTORE sets back the old property from the player. NOTHING will prevent AuthMe", - "from modifying the 'allow flight' property on the player." + "Whether the player is allowed to fly: RESTORE, ENABLE, DISABLE, NOTHING.", + "RESTORE sets back the old property from the player. NOTHING will prevent AuthMe", + "from modifying the 'allow flight' property on the player." }) public static final Property RESTORE_ALLOW_FLIGHT = - newProperty(AllowFlightRestoreType.class, "limbo.restoreAllowFlight", AllowFlightRestoreType.RESTORE); + newProperty(AllowFlightRestoreType.class, "limbo.restoreAllowFlight", AllowFlightRestoreType.RESTORE); @Comment({ - "Restore fly speed: RESTORE, DEFAULT, MAX_RESTORE, RESTORE_NO_ZERO.", - "RESTORE: restore the speed the player had;", - "DEFAULT: always set to default speed;", - "MAX_RESTORE: take the maximum of the player's current speed and the previous one", - "RESTORE_NO_ZERO: Like 'restore' but sets speed to default if the player's speed was 0" + "Restore fly speed: RESTORE, DEFAULT, MAX_RESTORE, RESTORE_NO_ZERO.", + "RESTORE: restore the speed the player had;", + "DEFAULT: always set to default speed;", + "MAX_RESTORE: take the maximum of the player's current speed and the previous one", + "RESTORE_NO_ZERO: Like 'restore' but sets speed to default if the player's speed was 0" }) public static final Property RESTORE_FLY_SPEED = - newProperty(WalkFlySpeedRestoreType.class, "limbo.restoreFlySpeed", WalkFlySpeedRestoreType.RESTORE_NO_ZERO); + newProperty(WalkFlySpeedRestoreType.class, "limbo.restoreFlySpeed", WalkFlySpeedRestoreType.RESTORE_NO_ZERO); @Comment({ - "Restore walk speed: RESTORE, DEFAULT, MAX_RESTORE, RESTORE_NO_ZERO.", - "See above for a description of the values." + "Restore walk speed: RESTORE, DEFAULT, MAX_RESTORE, RESTORE_NO_ZERO.", + "See above for a description of the values." }) public static final Property RESTORE_WALK_SPEED = - newProperty(WalkFlySpeedRestoreType.class, "limbo.restoreWalkSpeed", WalkFlySpeedRestoreType.RESTORE_NO_ZERO); + newProperty(WalkFlySpeedRestoreType.class, "limbo.restoreWalkSpeed", WalkFlySpeedRestoreType.RESTORE_NO_ZERO); private LimboSettings() { } @@ -72,11 +72,11 @@ public final class LimboSettings implements SettingsHolder { @Override public void registerComments(CommentsConfiguration conf) { String[] limboExplanation = { - "Before a user logs in, various properties are temporarily removed from the player,", - "such as OP status, ability to fly, and walk/fly speed.", - "Once the user is logged in, we add back the properties we previously saved.", - "In this section, you may define how these properties should be handled.", - "Read more at https://github.com/AuthMe/AuthMeReloaded/wiki/Limbo-players" + "Before a user logs in, various properties are temporarily removed from the player,", + "such as OP status, ability to fly, and walk/fly speed.", + "Once the user is logged in, we add back the properties we previously saved.", + "In this section, you may define how these properties should be handled.", + "Read more at https://github.com/AuthMe/AuthMeReloaded/wiki/Limbo-players" }; conf.setComment("limbo", limboExplanation); } diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java deleted file mode 100644 index 221496b3..00000000 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java +++ /dev/null @@ -1,122 +0,0 @@ -package fr.xephi.authme.settings.properties; - -import ch.jalu.configme.Comment; -import ch.jalu.configme.SettingsHolder; -import ch.jalu.configme.properties.Property; -import fr.xephi.authme.output.LogLevel; - -import java.util.Set; - -import static ch.jalu.configme.properties.PropertyInitializer.newLowercaseStringSetProperty; -import static ch.jalu.configme.properties.PropertyInitializer.newProperty; - -public final class PluginSettings implements SettingsHolder { - @Comment({ - "Should we execute /help command when unregistered players press Shift+F?", - "This keeps compatibility with some menu plugins", - "If you are using TrMenu, don't enable this because TrMenu already implemented this." - }) - public static final Property MENU_UNREGISTER_COMPATIBILITY = - newProperty("3rdPartyFeature.compatibility.menuPlugins", false); - - @Comment({ - "Send i18n messages to player based on their client settings, this option will override `settings.messagesLanguage`", - "(Requires Protocollib or Packetevents)", - "This will not affect language of AuthMe help command." - }) - public static final Property I18N_MESSAGES = - newProperty("3rdPartyFeature.features.i18nMessages.enabled", false); - - @Comment({"Redirect locale code to certain AuthMe language code as you want", - "Minecraft locale list: https://minecraft.wiki/w/Language", - "AuthMe language code: https://github.com/HaHaWTH/AuthMeReReloaded/blob/master/docs/translations.md", - "For example, if you want to show Russian messages to player using language Tatar(tt_ru),", - "and show Chinese Simplified messages to player using language Classical Chinese(lzh), then:", - "locale-code-redirect:", - "- 'tt_ru:ru'", - "- 'lzh:zhcn'"}) - public static final Property> I18N_CODE_REDIRECT = - newLowercaseStringSetProperty("3rdPartyFeature.features.i18nMessages.locale-code-redirect", - "tt_ru:ru", "lzh:zhcn"); - - @Comment({ - "Do you want to enable the session feature?", - "If enabled, when a player authenticates successfully,", - "his IP and his nickname is saved.", - "The next time the player joins the server, if his IP", - "is the same as last time and the timeout hasn't", - "expired, he will not need to authenticate." - }) - public static final Property SESSIONS_ENABLED = - newProperty("settings.sessions.enabled", true); - - @Comment({ - "After how many minutes should a session expire?", - "A player's session ends after the timeout or if his IP has changed" - }) - public static final Property SESSIONS_TIMEOUT = - newProperty("settings.sessions.timeout", 43200); - - @Comment({ - "Message language, available languages:", - "https://github.com/AuthMe/AuthMeReloaded/blob/master/docs/translations.md", - "Example: zhcn, en" - }) - public static final Property MESSAGES_LANGUAGE = - newProperty("settings.messagesLanguage", "en"); - - @Comment({ - "Enables switching a player to defined permission groups before they log in.", - "See below for a detailed explanation." - }) - public static final Property ENABLE_PERMISSION_CHECK = - newProperty("GroupOptions.enablePermissionCheck", false); - - @Comment({ - "This is a very important option: if a registered player joins the server", - "AuthMe will switch him to unLoggedInGroup. This should prevent all major exploits.", - "You can set up your permission plugin with this special group to have no permissions,", - "or only permission to chat (or permission to send private messages etc.).", - "The better way is to set up this group with few permissions, so if a player", - "tries to exploit an account they can do only what you've defined for the group.", - "After login, the player will be moved to his correct permissions group!", - "Please note that the group name is case-sensitive, so 'admin' is different from 'Admin'", - "Otherwise your group will be wiped and the player will join in the default group []!", - "Example: registeredPlayerGroup: 'NotLogged'" - }) - public static final Property REGISTERED_GROUP = - newProperty("GroupOptions.registeredPlayerGroup", ""); - - @Comment({ - "Similar to above, unregistered players can be set to the following", - "permissions group" - }) - public static final Property UNREGISTERED_GROUP = - newProperty("GroupOptions.unregisteredPlayerGroup", ""); - - @Comment("Forces authme to hook into Vault instead of a specific permission handler system.") - public static final Property FORCE_VAULT_HOOK = - newProperty("settings.forceVaultHook", false); - - @Comment({ - "Log level: INFO, FINE, DEBUG. Use INFO for general messages,", - "FINE for some additional detailed ones (like password failed),", - "and DEBUG for debugging" - }) - public static final Property LOG_LEVEL = - newProperty(LogLevel.class, "settings.logLevel", LogLevel.FINE); - - @Comment({ - "By default we schedule async tasks when talking to the database. If you want", - "typical communication with the database to happen synchronously, set this to false" - }) - public static final Property USE_ASYNC_TASKS = - newProperty("settings.useAsyncTasks", true); - - @Comment("The name of the server, used in some placeholders.") - public static final Property SERVER_NAME = newProperty("settings.serverName", "Your Minecraft Server"); - - private PluginSettings() { - } - -} diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeExecutor.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeExecutor.java index ea009604..9aabadb7 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeExecutor.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeExecutor.java @@ -1,8 +1,8 @@ package fr.xephi.authme.task.purge; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.datasource.DataSource; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PermissionsManager; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.service.PluginHookService; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeService.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeService.java index 880d5118..3ef24dd1 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeService.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeService.java @@ -1,8 +1,8 @@ package fr.xephi.authme.task.purge; -import fr.xephi.authme.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLogger; import fr.xephi.authme.datasource.DataSource; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PermissionsManager; import fr.xephi.authme.service.BukkitService; import fr.xephi.authme.settings.Settings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeTask.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeTask.java index 15ab6552..eb1162d0 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeTask.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/task/purge/PurgeTask.java @@ -1,8 +1,8 @@ package fr.xephi.authme.task.purge; import com.github.Anon8281.universalScheduler.UniversalRunnable; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.permission.PermissionsManager; import fr.xephi.authme.permission.PlayerStatePermission; import org.bukkit.Bukkit; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/util/Utils.java b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/util/Utils.java index 324a8eed..8cbc57d5 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/util/Utils.java +++ b/plugin/platform-bukkit/src/main/java/fr/xephi/authme/util/Utils.java @@ -1,7 +1,7 @@ package fr.xephi.authme.util; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; diff --git a/project/module-common/build.gradle.kts b/project/module-common/build.gradle.kts index dc8dec83..bdcbecfd 100644 --- a/project/module-common/build.gradle.kts +++ b/project/module-common/build.gradle.kts @@ -1,6 +1,8 @@ dependencies { compileOnly(project(":project:module-configuration")) + compileOnly(project(":project:module-util")) compileOnly(project(":project:module-logger")) - // ConfigMe + compileOnly(project(":project:module-security")) compileOnly(libs.configme) + compileOnly(libs.guava) } \ No newline at end of file diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/DataFolder.java b/project/module-common/src/main/java/fr/xephi/authme/initialization/DataFolder.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/DataFolder.java rename to project/module-common/src/main/java/fr/xephi/authme/initialization/DataFolder.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/HasCleanup.java b/project/module-common/src/main/java/fr/xephi/authme/initialization/HasCleanup.java similarity index 87% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/HasCleanup.java rename to project/module-common/src/main/java/fr/xephi/authme/initialization/HasCleanup.java index 351df4f6..f927624d 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/HasCleanup.java +++ b/project/module-common/src/main/java/fr/xephi/authme/initialization/HasCleanup.java @@ -4,7 +4,6 @@ package fr.xephi.authme.initialization; * Common interface for types which have data that becomes outdated * and that can be cleaned up periodically. * - * @see fr.xephi.authme.task.CleanupTask */ public interface HasCleanup { diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/Reloadable.java b/project/module-common/src/main/java/fr/xephi/authme/initialization/Reloadable.java similarity index 75% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/Reloadable.java rename to project/module-common/src/main/java/fr/xephi/authme/initialization/Reloadable.java index 65c3a337..18884a60 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/initialization/Reloadable.java +++ b/project/module-common/src/main/java/fr/xephi/authme/initialization/Reloadable.java @@ -3,7 +3,6 @@ package fr.xephi.authme.initialization; /** * Interface for reloadable entities. * - * @see fr.xephi.authme.command.executable.authme.ReloadCommand */ public interface Reloadable { diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/ConsoleLogger.java b/project/module-common/src/main/java/fr/xephi/authme/logger/ConsoleLogger.java similarity index 99% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/ConsoleLogger.java rename to project/module-common/src/main/java/fr/xephi/authme/logger/ConsoleLogger.java index 9ab9974e..897109e6 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/ConsoleLogger.java +++ b/project/module-common/src/main/java/fr/xephi/authme/logger/ConsoleLogger.java @@ -1,7 +1,6 @@ -package fr.xephi.authme; +package fr.xephi.authme.logger; import com.google.common.base.Throwables; -import fr.xephi.authme.output.LogLevel; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.PluginSettings; import fr.xephi.authme.settings.properties.SecuritySettings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/output/ConsoleLoggerFactory.java b/project/module-common/src/main/java/fr/xephi/authme/logger/ConsoleLoggerFactory.java similarity index 95% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/output/ConsoleLoggerFactory.java rename to project/module-common/src/main/java/fr/xephi/authme/logger/ConsoleLoggerFactory.java index fb51043d..5a56d865 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/output/ConsoleLoggerFactory.java +++ b/project/module-common/src/main/java/fr/xephi/authme/logger/ConsoleLoggerFactory.java @@ -1,6 +1,5 @@ -package fr.xephi.authme.output; +package fr.xephi.authme.logger; -import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.settings.Settings; import java.util.Map; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/EnumSetProperty.java b/project/module-common/src/main/java/fr/xephi/authme/settings/EnumSetProperty.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/EnumSetProperty.java rename to project/module-common/src/main/java/fr/xephi/authme/settings/EnumSetProperty.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/Settings.java b/project/module-common/src/main/java/fr/xephi/authme/settings/Settings.java similarity index 86% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/Settings.java rename to project/module-common/src/main/java/fr/xephi/authme/settings/Settings.java index ad0afa6f..cd7dc850 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/Settings.java +++ b/project/module-common/src/main/java/fr/xephi/authme/settings/Settings.java @@ -5,15 +5,14 @@ import ch.jalu.configme.configurationdata.ConfigurationData; import ch.jalu.configme.migration.MigrationService; import ch.jalu.configme.resource.PropertyResource; import com.google.common.io.Files; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; +import fr.xephi.authme.util.FileUtils; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; -import static fr.xephi.authme.util.FileUtils.copyFileFromResource; - /** * The AuthMe settings manager. */ @@ -31,9 +30,9 @@ public class Settings extends SettingsManagerImpl { /** * Constructor. * - * @param pluginFolder the AuthMe plugin folder - * @param resource the property resource to read and write properties to - * @param migrationService migration service to check the settings file with + * @param pluginFolder the AuthMe plugin folder + * @param resource the property resource to read and write properties to + * @param migrationService migration service to check the settings file with * @param configurationData configuration data (properties and comments) */ public Settings(File pluginFolder, PropertyResource resource, MigrationService migrationService, @@ -70,7 +69,9 @@ public class Settings extends SettingsManagerImpl { return recoveryCodeEmailMessage; } - public String getShutdownEmailMessage() {return shutdownEmailMessage;} + public String getShutdownEmailMessage() { + return shutdownEmailMessage; + } public String getNewPasswordEmailMessage() { return newPasswordEmailMessage; @@ -99,7 +100,7 @@ public class Settings extends SettingsManagerImpl { */ private String readFile(String filename) { final File file = new File(pluginFolder, filename); - if (copyFileFromResource(file, filename)) { + if (FileUtils.copyFileFromResource(file, filename)) { try { return Files.asCharSource(file, StandardCharsets.UTF_8).read(); } catch (IOException e) { @@ -110,4 +111,5 @@ public class Settings extends SettingsManagerImpl { } return ""; } + } diff --git a/project/module-common/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java b/project/module-common/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java new file mode 100644 index 00000000..e0f64db9 --- /dev/null +++ b/project/module-common/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java @@ -0,0 +1,122 @@ +package fr.xephi.authme.settings.properties; + +import ch.jalu.configme.Comment; +import ch.jalu.configme.SettingsHolder; +import ch.jalu.configme.properties.Property; +import fr.xephi.authme.logger.LogLevel; + +import java.util.Set; + +import static ch.jalu.configme.properties.PropertyInitializer.newLowercaseStringSetProperty; +import static ch.jalu.configme.properties.PropertyInitializer.newProperty; + +public final class PluginSettings implements SettingsHolder { + @Comment({ + "Should we execute /help command when unregistered players press Shift+F?", + "This keeps compatibility with some menu plugins", + "If you are using TrMenu, don't enable this because TrMenu already implemented this." + }) + public static final Property MENU_UNREGISTER_COMPATIBILITY = + newProperty("3rdPartyFeature.compatibility.menuPlugins", false); + + @Comment({ + "Send i18n messages to player based on their client settings, this option will override `settings.messagesLanguage`", + "(Requires Protocollib or Packetevents)", + "This will not affect language of AuthMe help command." + }) + public static final Property I18N_MESSAGES = + newProperty("3rdPartyFeature.features.i18nMessages.enabled", false); + + @Comment({"Redirect locale code to certain AuthMe language code as you want", + "Minecraft locale list: https://minecraft.wiki/w/Language", + "AuthMe language code: https://github.com/HaHaWTH/AuthMeReReloaded/blob/master/docs/translations.md", + "For example, if you want to show Russian messages to player using language Tatar(tt_ru),", + "and show Chinese Simplified messages to player using language Classical Chinese(lzh), then:", + "locale-code-redirect:", + "- 'tt_ru:ru'", + "- 'lzh:zhcn'"}) + public static final Property> I18N_CODE_REDIRECT = + newLowercaseStringSetProperty("3rdPartyFeature.features.i18nMessages.locale-code-redirect", + "tt_ru:ru", "lzh:zhcn"); + + @Comment({ + "Do you want to enable the session feature?", + "If enabled, when a player authenticates successfully,", + "his IP and his nickname is saved.", + "The next time the player joins the server, if his IP", + "is the same as last time and the timeout hasn't", + "expired, he will not need to authenticate." + }) + public static final Property SESSIONS_ENABLED = + newProperty("settings.sessions.enabled", true); + + @Comment({ + "After how many minutes should a session expire?", + "A player's session ends after the timeout or if his IP has changed" + }) + public static final Property SESSIONS_TIMEOUT = + newProperty("settings.sessions.timeout", 43200); + + @Comment({ + "Message language, available languages:", + "https://github.com/AuthMe/AuthMeReloaded/blob/master/docs/translations.md", + "Example: zhcn, en" + }) + public static final Property MESSAGES_LANGUAGE = + newProperty("settings.messagesLanguage", "en"); + + @Comment({ + "Enables switching a player to defined permission groups before they log in.", + "See below for a detailed explanation." + }) + public static final Property ENABLE_PERMISSION_CHECK = + newProperty("GroupOptions.enablePermissionCheck", false); + + @Comment({ + "This is a very important option: if a registered player joins the server", + "AuthMe will switch him to unLoggedInGroup. This should prevent all major exploits.", + "You can set up your permission plugin with this special group to have no permissions,", + "or only permission to chat (or permission to send private messages etc.).", + "The better way is to set up this group with few permissions, so if a player", + "tries to exploit an account they can do only what you've defined for the group.", + "After login, the player will be moved to his correct permissions group!", + "Please note that the group name is case-sensitive, so 'admin' is different from 'Admin'", + "Otherwise your group will be wiped and the player will join in the default group []!", + "Example: registeredPlayerGroup: 'NotLogged'" + }) + public static final Property REGISTERED_GROUP = + newProperty("GroupOptions.registeredPlayerGroup", ""); + + @Comment({ + "Similar to above, unregistered players can be set to the following", + "permissions group" + }) + public static final Property UNREGISTERED_GROUP = + newProperty("GroupOptions.unregisteredPlayerGroup", ""); + + @Comment("Forces authme to hook into Vault instead of a specific permission handler system.") + public static final Property FORCE_VAULT_HOOK = + newProperty("settings.forceVaultHook", false); + + @Comment({ + "Log level: INFO, FINE, DEBUG. Use INFO for general messages,", + "FINE for some additional detailed ones (like password failed),", + "and DEBUG for debugging" + }) + public static final Property LOG_LEVEL = + newProperty(LogLevel.class, "settings.logLevel", LogLevel.FINE); + + @Comment({ + "By default we schedule async tasks when talking to the database. If you want", + "typical communication with the database to happen synchronously, set this to false" + }) + public static final Property USE_ASYNC_TASKS = + newProperty("settings.useAsyncTasks", true); + + @Comment("The name of the server, used in some placeholders.") + public static final Property SERVER_NAME = newProperty("settings.serverName", "Your Minecraft Server"); + + private PluginSettings() { + } + +} diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java b/project/module-common/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java similarity index 53% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java rename to project/module-common/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java index b1d7c4ae..af460ae2 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java +++ b/project/module-common/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java @@ -14,188 +14,188 @@ import static ch.jalu.configme.properties.PropertyInitializer.newProperty; public final class SecuritySettings implements SettingsHolder { @Comment({"Stop the server if we can't contact the sql database", - "Take care with this, if you set this to false,", - "AuthMe will automatically disable and the server won't be protected!"}) + "Take care with this, if you set this to false,", + "AuthMe will automatically disable and the server won't be protected!"}) public static final Property STOP_SERVER_ON_PROBLEM = - newProperty("Security.SQLProblem.stopServer", false); + newProperty("Security.SQLProblem.stopServer", false); @Comment({"Should we let Bedrock players login automatically?", - "(Requires hookFloodgate to be true & floodgate loaded)", - "(**THIS IS SAFE DO NOT WORRY**)"}) + "(Requires hookFloodgate to be true & floodgate loaded)", + "(**THIS IS SAFE DO NOT WORRY**)"}) public static final Property FORCE_LOGIN_BEDROCK = - newProperty("3rdPartyFeature.features.bedrockAutoLogin", false); + newProperty("3rdPartyFeature.features.bedrockAutoLogin", false); @Comment("Should we purge data on non-registered players quit?") public static final Property PURGE_DATA_ON_QUIT = - newProperty("3rdPartyFeature.features.purgeData.purgeOnQuit", false); + newProperty("3rdPartyFeature.features.purgeData.purgeOnQuit", false); @Comment("Which world's player data should be deleted?(Enter the world *FOLDER* name where your players first logged in)") public static final Property DELETE_PLAYER_DATA_WORLD = - newProperty("3rdPartyFeature.features.purgeData.purgeWorldFolderName", "world"); + newProperty("3rdPartyFeature.features.purgeData.purgeWorldFolderName", "world"); @Comment("Enable the new feature to prevent ghost players?") public static final Property ANTI_GHOST_PLAYERS = - newProperty("3rdPartyFeature.fixes.antiGhostPlayer", false); + newProperty("3rdPartyFeature.fixes.antiGhostPlayer", false); @Comment({"(MC1.13- only)", - "Should we fix the shulker crash bug with advanced method?"}) + "Should we fix the shulker crash bug with advanced method?"}) public static final Property ADVANCED_SHULKER_FIX = - newProperty("3rdPartyFeature.fixes.advancedShulkerFix", false); + newProperty("3rdPartyFeature.fixes.advancedShulkerFix", false); @Comment("Should we fix the location when players logged in the portal?") public static final Property LOGIN_LOC_FIX_SUB_PORTAL = - newProperty("3rdPartyFeature.fixes.loginLocationFix.fixPortalStuck", false); + newProperty("3rdPartyFeature.fixes.loginLocationFix.fixPortalStuck", false); @Comment("Should we fix the location when players logged underground?") public static final Property LOGIN_LOC_FIX_SUB_UNDERGROUND = - newProperty("3rdPartyFeature.fixes.loginLocationFix.fixGroundStuck", false); + newProperty("3rdPartyFeature.fixes.loginLocationFix.fixGroundStuck", false); @Comment("Copy AuthMe log output in a separate file as well?") public static final Property USE_LOGGING = - newProperty("Security.console.logConsole", true); + newProperty("Security.console.logConsole", true); @Comment({"Query haveibeenpwned.com with a hashed version of the password.", - "This is used to check whether it is safe."}) + "This is used to check whether it is safe."}) public static final Property HAVE_I_BEEN_PWNED_CHECK = - newProperty("Security.account.haveIBeenPwned.check", false); + newProperty("Security.account.haveIBeenPwned.check", false); @Comment({"If the password is used more than this number of times, it is considered unsafe."}) public static final Property HAVE_I_BEEN_PWNED_LIMIT = - newProperty("Security.account.haveIBeenPwned.limit", 0); + newProperty("Security.account.haveIBeenPwned.limit", 0); @Comment("Enable captcha when a player uses wrong password too many times") public static final Property ENABLE_LOGIN_FAILURE_CAPTCHA = - newProperty("Security.captcha.useCaptcha", false); + newProperty("Security.captcha.useCaptcha", false); @Comment("Check for updates on enabled from GitHub?") public static final Property CHECK_FOR_UPDATES = - newProperty("Plugin.updates.checkForUpdates", true); + newProperty("Plugin.updates.checkForUpdates", true); @Comment("Should we show the AuthMe banner on startup?") public static final Property SHOW_STARTUP_BANNER = - newProperty("Plugin.banners.showBanners", true); + newProperty("Plugin.banners.showBanners", true); @Comment("Max allowed tries before a captcha is required") public static final Property MAX_LOGIN_TRIES_BEFORE_CAPTCHA = - newProperty("Security.captcha.maxLoginTry", 8); + newProperty("Security.captcha.maxLoginTry", 8); @Comment("Captcha length") public static final Property CAPTCHA_LENGTH = - newProperty("Security.captcha.captchaLength", 6); + newProperty("Security.captcha.captchaLength", 6); @Comment("Minutes after which login attempts count is reset for a player") public static final Property CAPTCHA_COUNT_MINUTES_BEFORE_RESET = - newProperty("Security.captcha.captchaCountReset", 120); + newProperty("Security.captcha.captchaCountReset", 120); @Comment("Require captcha before a player may register?") public static final Property ENABLE_CAPTCHA_FOR_REGISTRATION = - newProperty("Security.captcha.requireForRegistration", false); + newProperty("Security.captcha.requireForRegistration", false); @Comment("Minimum length of password") public static final Property MIN_PASSWORD_LENGTH = - newProperty("settings.security.minPasswordLength", 8); + newProperty("settings.security.minPasswordLength", 8); @Comment("Maximum length of password") public static final Property MAX_PASSWORD_LENGTH = - newProperty("settings.security.passwordMaxLength", 26); + newProperty("settings.security.passwordMaxLength", 26); @Comment({ - "Possible values: SHA256, BCRYPT, BCRYPT2Y, PBKDF2, SALTEDSHA512,", - "MYBB, IPB3, PHPBB, PHPFUSION, SMF, XENFORO, XAUTH, JOOMLA, WBB3, WBB4, MD5VB,", - "PBKDF2DJANGO, WORDPRESS, ROYALAUTH, ARGON2, NOCRYPT, CUSTOM (for developers only). See full list at", - "https://github.com/AuthMe/AuthMeReloaded/blob/master/docs/hash_algorithms.md", - "If you use ARGON2, check that you have the argon2 c library on your system" + "Possible values: SHA256, BCRYPT, BCRYPT2Y, PBKDF2, SALTEDSHA512,", + "MYBB, IPB3, PHPBB, PHPFUSION, SMF, XENFORO, XAUTH, JOOMLA, WBB3, WBB4, MD5VB,", + "PBKDF2DJANGO, WORDPRESS, ROYALAUTH, ARGON2, NOCRYPT, CUSTOM (for developers only). See full list at", + "https://github.com/AuthMe/AuthMeReloaded/blob/master/docs/hash_algorithms.md", + "If you use ARGON2, check that you have the argon2 c library on your system" }) public static final Property PASSWORD_HASH = - newProperty(HashAlgorithm.class, "settings.security.passwordHash", HashAlgorithm.SHA256); + newProperty(HashAlgorithm.class, "settings.security.passwordHash", HashAlgorithm.SHA256); @Comment({ - "If a password check fails, AuthMe will also try to check with the following hash methods.", - "Use this setting when you change from one hash method to another.", - "AuthMe will update the password to the new hash. Example:", - "legacyHashes:", - "- 'SHA1'" + "If a password check fails, AuthMe will also try to check with the following hash methods.", + "Use this setting when you change from one hash method to another.", + "AuthMe will update the password to the new hash. Example:", + "legacyHashes:", + "- 'SHA1'" }) public static final Property> LEGACY_HASHES = - new EnumSetProperty<>(HashAlgorithm.class, "settings.security.legacyHashes"); + new EnumSetProperty<>(HashAlgorithm.class, "settings.security.legacyHashes"); @Comment("Salt length for the SALTED2MD5 MD5(MD5(password)+salt)") public static final Property DOUBLE_MD5_SALT_LENGTH = - newProperty("settings.security.doubleMD5SaltLength", 8); + newProperty("settings.security.doubleMD5SaltLength", 8); @Comment("Number of rounds to use if passwordHash is set to PBKDF2. Default is 10000") public static final Property PBKDF2_NUMBER_OF_ROUNDS = - newProperty("settings.security.pbkdf2Rounds", 10000); + newProperty("settings.security.pbkdf2Rounds", 10000); @Comment({"Prevent unsafe passwords from being used; put them in lowercase!", - "You should always set 'help' as unsafePassword due to possible conflicts.", - "unsafePasswords:", - "- '123456'", - "- 'password'", - "- 'help'"}) + "You should always set 'help' as unsafePassword due to possible conflicts.", + "unsafePasswords:", + "- '123456'", + "- 'password'", + "- 'help'"}) public static final Property> UNSAFE_PASSWORDS = - newLowercaseStringSetProperty("settings.security.unsafePasswords", - "12345678", "password", "qwertyui", "123456789", "87654321", "1234567890", "asdfghjkl","zxcvbnm,","asdfghjk","12312312","123123123","32132132","321321321"); + newLowercaseStringSetProperty("settings.security.unsafePasswords", + "12345678", "password", "qwertyui", "123456789", "87654321", "1234567890", "asdfghjkl", "zxcvbnm,", "asdfghjk", "12312312", "123123123", "32132132", "321321321"); @Comment("Tempban a user's IP address if they enter the wrong password too many times") public static final Property TEMPBAN_ON_MAX_LOGINS = - newProperty("Security.tempban.enableTempban", false); + newProperty("Security.tempban.enableTempban", false); @Comment("How many times a user can attempt to login before their IP being tempbanned") public static final Property MAX_LOGIN_TEMPBAN = - newProperty("Security.tempban.maxLoginTries", 8); + newProperty("Security.tempban.maxLoginTries", 8); @Comment({"The length of time a IP address will be tempbanned in minutes", - "Default: 480 minutes, or 8 hours"}) + "Default: 480 minutes, or 8 hours"}) public static final Property TEMPBAN_LENGTH = - newProperty("Security.tempban.tempbanLength", 480); + newProperty("Security.tempban.tempbanLength", 480); @Comment({"How many minutes before resetting the count for failed logins by IP and username", - "Default: 480 minutes (8 hours)"}) + "Default: 480 minutes (8 hours)"}) public static final Property TEMPBAN_MINUTES_BEFORE_RESET = - newProperty("Security.tempban.minutesBeforeCounterReset", 480); + newProperty("Security.tempban.minutesBeforeCounterReset", 480); @Comment({"The command to execute instead of using the internal ban system, empty if disabled.", - "Available placeholders: %player%, %ip%"}) + "Available placeholders: %player%, %ip%"}) public static final Property TEMPBAN_CUSTOM_COMMAND = - newProperty("Security.tempban.customCommand", ""); + newProperty("Security.tempban.customCommand", ""); @Comment("Number of characters a recovery code should have (0 to disable)") public static final Property RECOVERY_CODE_LENGTH = - newProperty("Security.recoveryCode.length", 8); + newProperty("Security.recoveryCode.length", 8); @Comment("How many hours is a recovery code valid for?") public static final Property RECOVERY_CODE_HOURS_VALID = - newProperty("Security.recoveryCode.validForHours", 6); + newProperty("Security.recoveryCode.validForHours", 6); @Comment("Max number of tries to enter recovery code") public static final Property RECOVERY_CODE_MAX_TRIES = - newProperty("Security.recoveryCode.maxTries", 4); + newProperty("Security.recoveryCode.maxTries", 4); @Comment({"How long a player has after password recovery to change their password", - "without logging in. This is in minutes.", - "Default: 2 minutes"}) + "without logging in. This is in minutes.", + "Default: 2 minutes"}) public static final Property PASSWORD_CHANGE_TIMEOUT = - newProperty("Security.recoveryCode.passwordChangeTimeout", 5); + newProperty("Security.recoveryCode.passwordChangeTimeout", 5); @Comment({ - "Seconds a user has to wait for before a password recovery mail may be sent again", - "This prevents an attacker from abusing AuthMe's email feature." + "Seconds a user has to wait for before a password recovery mail may be sent again", + "This prevents an attacker from abusing AuthMe's email feature." }) public static final Property EMAIL_RECOVERY_COOLDOWN_SECONDS = - newProperty("Security.emailRecovery.cooldown", 60); + newProperty("Security.emailRecovery.cooldown", 60); @Comment({ - "The mail shown using /email show will be partially hidden", - "E.g. (if enabled)", - " original email: my.email@example.com", - " hidden email: my.***@***mple.com" + "The mail shown using /email show will be partially hidden", + "E.g. (if enabled)", + " original email: my.email@example.com", + " hidden email: my.***@***mple.com" }) public static final Property USE_EMAIL_MASKING = - newProperty("Security.privacy.enableEmailMasking", false); + newProperty("Security.privacy.enableEmailMasking", false); @Comment("Minutes after which a verification code will expire") public static final Property VERIFICATION_CODE_EXPIRATION_MINUTES = - newProperty("Security.privacy.verificationCodeExpiration", 10); + newProperty("Security.privacy.verificationCodeExpiration", 10); private SecuritySettings() { } diff --git a/project/module-database/build.gradle.kts b/project/module-database/build.gradle.kts new file mode 100644 index 00000000..0a9a2c2d --- /dev/null +++ b/project/module-database/build.gradle.kts @@ -0,0 +1,7 @@ +dependencies { + compileOnly(project(":project:module-common")) + compileOnly(project(":project:module-util")) + compileOnly(project(":project:module-logger")) + compileOnly(project(":project:module-configuration")) + compileOnly(project(":project:module-message")) +} \ No newline at end of file diff --git a/project/module-logger/build.gradle.kts b/project/module-logger/build.gradle.kts index 0c2287dd..fe9e26f7 100644 --- a/project/module-logger/build.gradle.kts +++ b/project/module-logger/build.gradle.kts @@ -1,6 +1,5 @@ dependencies { compileOnly(project(":project:module-util")) - compileOnly(project(":project:module-common")) compileOnly(libs.guava) // Log4J Logger (required by the console filter) compileOnly("org.apache.logging.log4j:log4j-core:2.20.0") // Log4J version bundled in 1.12.2 diff --git a/project/module-logger/src/main/java/fr/xephi/authme/output/ConsoleFilter.java b/project/module-logger/src/main/java/fr/xephi/authme/logger/ConsoleFilter.java similarity index 95% rename from project/module-logger/src/main/java/fr/xephi/authme/output/ConsoleFilter.java rename to project/module-logger/src/main/java/fr/xephi/authme/logger/ConsoleFilter.java index 975cc4cc..552bb068 100644 --- a/project/module-logger/src/main/java/fr/xephi/authme/output/ConsoleFilter.java +++ b/project/module-logger/src/main/java/fr/xephi/authme/logger/ConsoleFilter.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.output; +package fr.xephi.authme.logger; import java.util.logging.Filter; import java.util.logging.LogRecord; diff --git a/project/module-logger/src/main/java/fr/xephi/authme/output/Log4JFilter.java b/project/module-logger/src/main/java/fr/xephi/authme/logger/Log4JFilter.java similarity index 98% rename from project/module-logger/src/main/java/fr/xephi/authme/output/Log4JFilter.java rename to project/module-logger/src/main/java/fr/xephi/authme/logger/Log4JFilter.java index 44977d24..756071f2 100644 --- a/project/module-logger/src/main/java/fr/xephi/authme/output/Log4JFilter.java +++ b/project/module-logger/src/main/java/fr/xephi/authme/logger/Log4JFilter.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.output; +package fr.xephi.authme.logger; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Marker; diff --git a/project/module-logger/src/main/java/fr/xephi/authme/output/LogFilterHelper.java b/project/module-logger/src/main/java/fr/xephi/authme/logger/LogFilterHelper.java similarity index 98% rename from project/module-logger/src/main/java/fr/xephi/authme/output/LogFilterHelper.java rename to project/module-logger/src/main/java/fr/xephi/authme/logger/LogFilterHelper.java index 2864fbab..013d9268 100644 --- a/project/module-logger/src/main/java/fr/xephi/authme/output/LogFilterHelper.java +++ b/project/module-logger/src/main/java/fr/xephi/authme/logger/LogFilterHelper.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.output; +package fr.xephi.authme.logger; import com.google.common.annotations.VisibleForTesting; import fr.xephi.authme.util.StringUtils; diff --git a/project/module-logger/src/main/java/fr/xephi/authme/output/LogLevel.java b/project/module-logger/src/main/java/fr/xephi/authme/logger/LogLevel.java similarity index 96% rename from project/module-logger/src/main/java/fr/xephi/authme/output/LogLevel.java rename to project/module-logger/src/main/java/fr/xephi/authme/logger/LogLevel.java index f958e6d4..9a60683f 100644 --- a/project/module-logger/src/main/java/fr/xephi/authme/output/LogLevel.java +++ b/project/module-logger/src/main/java/fr/xephi/authme/logger/LogLevel.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.output; +package fr.xephi.authme.logger; /** * Log level. diff --git a/project/module-mail/build.gradle.kts b/project/module-mail/build.gradle.kts new file mode 100644 index 00000000..24f1d6a9 --- /dev/null +++ b/project/module-mail/build.gradle.kts @@ -0,0 +1,15 @@ +dependencies { + compileOnly(project(":project:module-common")) + compileOnly(project(":project:module-util")) + compileOnly(project(":project:module-logger")) + compileOnly(project(":project:module-configuration")) + compileOnly(project(":project:module-message")) + compileOnly(libs.configme) + compileOnly(libs.jalu.injector) + // Java Email Library + implementation("org.apache.commons:commons-email:1.6.0") +} + +tasks.shadowJar { + relocate("org.apache.commons", "${project.group}.libs.org.apache.commons") +} \ No newline at end of file diff --git a/project/module-mail/src/main/java/fr/xephi/authme/mail/EmailService.java b/project/module-mail/src/main/java/fr/xephi/authme/mail/EmailService.java index c12c0bab..400119dc 100644 --- a/project/module-mail/src/main/java/fr/xephi/authme/mail/EmailService.java +++ b/project/module-mail/src/main/java/fr/xephi/authme/mail/EmailService.java @@ -1,8 +1,8 @@ package fr.xephi.authme.mail; -import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.initialization.DataFolder; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.EmailSettings; import fr.xephi.authme.settings.properties.PluginSettings; diff --git a/project/module-mail/src/main/java/fr/xephi/authme/mail/ImageGenerator.java b/project/module-mail/src/main/java/fr/xephi/authme/mail/ImageGenerator.java new file mode 100644 index 00000000..74f34e1b --- /dev/null +++ b/project/module-mail/src/main/java/fr/xephi/authme/mail/ImageGenerator.java @@ -0,0 +1,41 @@ +package fr.xephi.authme.mail; + +import java.awt.*; +import java.awt.image.BufferedImage; + +/** + * + */ +public class ImageGenerator { + + private final String pass; + + /** + * Constructor for ImageGenerator. + * + * @param pass String + */ + public ImageGenerator(String pass) { + this.pass = pass; + } + + /** + * Method generateImage. + * + * @return BufferedImage + */ + public BufferedImage generateImage() { + BufferedImage image = new BufferedImage(200, 60, BufferedImage.TYPE_BYTE_INDEXED); + Graphics2D graphics = image.createGraphics(); + graphics.setColor(Color.BLACK); + graphics.fillRect(0, 0, 200, 40); + GradientPaint gradientPaint = new GradientPaint(10, 5, Color.WHITE, 20, 10, Color.WHITE, true); + graphics.setPaint(gradientPaint); + Font font = new Font("Comic Sans MS", Font.BOLD, 30); + graphics.setFont(font); + graphics.drawString(pass, 5, 30); + graphics.dispose(); + image.flush(); + return image; + } +} diff --git a/project/module-mail/src/main/java/fr/xephi/authme/mail/OAuth2Provider.java b/project/module-mail/src/main/java/fr/xephi/authme/mail/OAuth2Provider.java new file mode 100644 index 00000000..5f60e3fd --- /dev/null +++ b/project/module-mail/src/main/java/fr/xephi/authme/mail/OAuth2Provider.java @@ -0,0 +1,28 @@ +package fr.xephi.authme.mail; + +import java.security.Provider; + +/* Copyright 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +public class OAuth2Provider extends Provider { + private static final long serialVersionUID = 1L; + + public OAuth2Provider() { + super("Google OAuth2 Provider", 1.0, + "Provides the XOAUTH2 SASL Mechanism"); + put("SaslClientFactory.XOAUTH2", + "fr.xephi.authme.mail.OAuth2SaslClientFactory"); + } +} \ No newline at end of file diff --git a/project/module-mail/src/main/java/fr/xephi/authme/mail/OAuth2SaslClient.java b/project/module-mail/src/main/java/fr/xephi/authme/mail/OAuth2SaslClient.java new file mode 100644 index 00000000..1f5a4e48 --- /dev/null +++ b/project/module-mail/src/main/java/fr/xephi/authme/mail/OAuth2SaslClient.java @@ -0,0 +1,98 @@ +/* Copyright 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package fr.xephi.authme.mail; + +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.NameCallback; +import javax.security.auth.callback.UnsupportedCallbackException; +import javax.security.sasl.SaslClient; +import javax.security.sasl.SaslException; +import java.io.IOException; + +/** + * An OAuth2 implementation of SaslClient. + */ +class OAuth2SaslClient implements SaslClient { + private final String oauthToken; + private final CallbackHandler callbackHandler; + + private boolean isComplete = false; + + /** + * Creates a new instance of the OAuth2SaslClient. This will ordinarily only + * be called from OAuth2SaslClientFactory. + */ + public OAuth2SaslClient(String oauthToken, + CallbackHandler callbackHandler) { + this.oauthToken = oauthToken; + this.callbackHandler = callbackHandler; + } + + public String getMechanismName() { + return "XOAUTH2"; + } + + public boolean hasInitialResponse() { + return true; + } + + public byte[] evaluateChallenge(byte[] challenge) throws SaslException { + if (isComplete) { + // Empty final response from server, just ignore it. + return new byte[]{}; + } + + NameCallback nameCallback = new NameCallback("Enter name"); + Callback[] callbacks = new Callback[]{nameCallback}; + try { + callbackHandler.handle(callbacks); + } catch (UnsupportedCallbackException e) { + throw new SaslException("Unsupported callback: " + e); + } catch (IOException e) { + throw new SaslException("Failed to execute callback: " + e); + } + String email = nameCallback.getName(); + + byte[] response = String.format("user=%s\1auth=Bearer %s\1\1", email, + oauthToken).getBytes(); + isComplete = true; + return response; + } + + public boolean isComplete() { + return isComplete; + } + + public byte[] unwrap(byte[] incoming, int offset, int len) + throws SaslException { + throw new IllegalStateException(); + } + + public byte[] wrap(byte[] outgoing, int offset, int len) + throws SaslException { + throw new IllegalStateException(); + } + + public Object getNegotiatedProperty(String propName) { + if (!isComplete()) { + throw new IllegalStateException(); + } + return null; + } + + public void dispose() throws SaslException { + } +} diff --git a/project/module-mail/src/main/java/fr/xephi/authme/mail/OAuth2SaslClientFactory.java b/project/module-mail/src/main/java/fr/xephi/authme/mail/OAuth2SaslClientFactory.java new file mode 100644 index 00000000..ae63dffe --- /dev/null +++ b/project/module-mail/src/main/java/fr/xephi/authme/mail/OAuth2SaslClientFactory.java @@ -0,0 +1,57 @@ +/* + * Copyright 2012 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package fr.xephi.authme.mail; + +import javax.security.auth.callback.CallbackHandler; +import javax.security.sasl.SaslClient; +import javax.security.sasl.SaslClientFactory; +import java.util.Map; +import java.util.logging.Logger; + +/** + * A SaslClientFactory that returns instances of OAuth2SaslClient. + * + *

+ * Only the "XOAUTH2" mechanism is supported. The {@code callbackHandler} is + * passed to the OAuth2SaslClient. Other parameters are ignored. + */ +public class OAuth2SaslClientFactory implements SaslClientFactory { + + private static final Logger logger = Logger.getLogger(OAuth2SaslClientFactory.class.getName()); + + public static final String OAUTH_TOKEN_PROP = "mail.smpt.sasl.mechanisms.oauth2.oauthToken"; + + public SaslClient createSaslClient(String[] mechanisms, + String authorizationId, String protocol, String serverName, + Map props, CallbackHandler callbackHandler) { + boolean matchedMechanism = false; + for (int i = 0; i < mechanisms.length; ++i) { + if ("XOAUTH2".equalsIgnoreCase(mechanisms[i])) { + matchedMechanism = true; + break; + } + } + if (!matchedMechanism) { + logger.info("Failed to match any mechanisms"); + return null; + } + return new OAuth2SaslClient((String) props.get(OAUTH_TOKEN_PROP), callbackHandler); + } + + public String[] getMechanismNames(Map props) { + return new String[]{"XOAUTH2"}; + } +} diff --git a/project/module-mail/src/main/java/fr/xephi/authme/mail/SendMailSsl.java b/project/module-mail/src/main/java/fr/xephi/authme/mail/SendMailSsl.java index bcc60f5a..ca5eb3a5 100644 --- a/project/module-mail/src/main/java/fr/xephi/authme/mail/SendMailSsl.java +++ b/project/module-mail/src/main/java/fr/xephi/authme/mail/SendMailSsl.java @@ -1,8 +1,8 @@ package fr.xephi.authme.mail; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; -import fr.xephi.authme.output.LogLevel; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; +import fr.xephi.authme.logger.LogLevel; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.EmailSettings; import fr.xephi.authme.settings.properties.PluginSettings; @@ -18,9 +18,6 @@ import javax.mail.Session; import java.security.Security; import java.util.Properties; -import static fr.xephi.authme.settings.properties.EmailSettings.MAIL_ACCOUNT; -import static fr.xephi.authme.settings.properties.EmailSettings.MAIL_PASSWORD; - /** * Sends emails to players on behalf of the server. @@ -39,7 +36,7 @@ public class SendMailSsl { */ public boolean hasAllInformation() { return !settings.getProperty(EmailSettings.MAIL_ACCOUNT).isEmpty() - && !settings.getProperty(EmailSettings.MAIL_PASSWORD).isEmpty(); + && !settings.getProperty(EmailSettings.MAIL_PASSWORD).isEmpty(); } /** @@ -52,12 +49,12 @@ public class SendMailSsl { */ public HtmlEmail initializeMail(String emailAddress) throws EmailException { String senderMail = StringUtils.isBlank(settings.getProperty(EmailSettings.MAIL_ADDRESS)) - ? settings.getProperty(EmailSettings.MAIL_ACCOUNT) - : settings.getProperty(EmailSettings.MAIL_ADDRESS); + ? settings.getProperty(EmailSettings.MAIL_ACCOUNT) + : settings.getProperty(EmailSettings.MAIL_ADDRESS); String senderName = StringUtils.isBlank(settings.getProperty(EmailSettings.MAIL_SENDER_NAME)) - ? senderMail - : settings.getProperty(EmailSettings.MAIL_SENDER_NAME); + ? senderMail + : settings.getProperty(EmailSettings.MAIL_SENDER_NAME); String mailPassword = settings.getProperty(EmailSettings.MAIL_PASSWORD); int port = settings.getProperty(EmailSettings.SMTP_PORT); @@ -81,7 +78,7 @@ public class SendMailSsl { * Sets the given content to the HtmlEmail object and sends it. * * @param content the content to set - * @param email the email object to send + * @param email the email object to send * @return true upon success, false otherwise */ public boolean sendEmail(String content, HtmlEmail email) { @@ -115,7 +112,7 @@ public class SendMailSsl { * Sets properties to the given HtmlEmail object based on the port from which it will be sent. * * @param email the email object to configure - * @param port the configured outgoing port + * @param port the configured outgoing port */ private void setPropertiesForPort(HtmlEmail email, int port) throws EmailException { switch (port) { diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java b/project/module-mail/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java similarity index 64% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java rename to project/module-mail/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java index a0cc03e2..4af0c40d 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java +++ b/project/module-mail/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java @@ -10,65 +10,65 @@ public final class EmailSettings implements SettingsHolder { @Comment("Email SMTP server host") public static final Property SMTP_HOST = - newProperty("Email.mailSMTP", "smtp.163.com"); + PropertyInitializer.newProperty("Email.mailSMTP", "smtp.163.com"); @Comment("Email SMTP server port") public static final Property SMTP_PORT = - newProperty("Email.mailPort", 465); + PropertyInitializer.newProperty("Email.mailPort", 465); @Comment("Only affects port 25: enable TLS/STARTTLS?") public static final Property PORT25_USE_TLS = - newProperty("Email.useTls", true); + PropertyInitializer.newProperty("Email.useTls", true); @Comment("Email account which sends the mails") public static final Property MAIL_ACCOUNT = - newProperty("Email.mailAccount", ""); + PropertyInitializer.newProperty("Email.mailAccount", ""); @Comment("Email account password") public static final Property MAIL_PASSWORD = - newProperty("Email.mailPassword", ""); + PropertyInitializer.newProperty("Email.mailPassword", ""); @Comment("Email address, fill when mailAccount is not the email address of the account") public static final Property MAIL_ADDRESS = - newProperty("Email.mailAddress", ""); + PropertyInitializer.newProperty("Email.mailAddress", ""); @Comment("Custom sender name, replacing the mailAccount name in the email") public static final Property MAIL_SENDER_NAME = - newProperty("Email.mailSenderName", ""); + PropertyInitializer.newProperty("Email.mailSenderName", ""); @Comment("Recovery password length") public static final Property RECOVERY_PASSWORD_LENGTH = - newProperty("Email.RecoveryPasswordLength", 12); + PropertyInitializer.newProperty("Email.RecoveryPasswordLength", 12); @Comment("Mail Subject") public static final Property RECOVERY_MAIL_SUBJECT = - newProperty("Email.mailSubject", "Your new AuthMe password"); + PropertyInitializer.newProperty("Email.mailSubject", "Your new AuthMe password"); @Comment("Like maxRegPerIP but with email") public static final Property MAX_REG_PER_EMAIL = - newProperty("Email.maxRegPerEmail", 1); + PropertyInitializer.newProperty("Email.maxRegPerEmail", 1); @Comment("Recall players to add an email?") public static final Property RECALL_PLAYERS = - newProperty("Email.recallPlayers", false); + PropertyInitializer.newProperty("Email.recallPlayers", false); @Comment("Delay in minute for the recall scheduler") public static final Property DELAY_RECALL = - newProperty("Email.delayRecall", 5); + PropertyInitializer.newProperty("Email.delayRecall", 5); @Comment("Send the new password drawn in an image?") public static final Property PASSWORD_AS_IMAGE = - newProperty("Email.generateImage", false); + PropertyInitializer.newProperty("Email.generateImage", false); @Comment("The OAuth2 token") public static final Property OAUTH2_TOKEN = - newProperty("Email.emailOauth2Token", ""); + PropertyInitializer.newProperty("Email.emailOauth2Token", ""); @Comment("Email notifications when the server shuts down") public static final Property SHUTDOWN_MAIL = - newProperty("Email.shutDownEmail", false); + PropertyInitializer.newProperty("Email.shutDownEmail", false); @Comment("Email notification address when the server is shut down") public static final Property SHUTDOWN_MAIL_ADDRESS = - newProperty("Email.shutDownEmailAddress", "your@mail.com"); + PropertyInitializer.newProperty("Email.shutDownEmailAddress", "your@mail.com"); private EmailSettings() { } diff --git a/project/module-security/build.gradle.kts b/project/module-security/build.gradle.kts new file mode 100644 index 00000000..0a9a2c2d --- /dev/null +++ b/project/module-security/build.gradle.kts @@ -0,0 +1,7 @@ +dependencies { + compileOnly(project(":project:module-common")) + compileOnly(project(":project:module-util")) + compileOnly(project(":project:module-logger")) + compileOnly(project(":project:module-configuration")) + compileOnly(project(":project:module-message")) +} \ No newline at end of file diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/HashAlgorithm.java b/project/module-security/src/main/java/fr/xephi/authme/security/HashAlgorithm.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/HashAlgorithm.java rename to project/module-security/src/main/java/fr/xephi/authme/security/HashAlgorithm.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/HashUtils.java b/project/module-security/src/main/java/fr/xephi/authme/security/HashUtils.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/HashUtils.java rename to project/module-security/src/main/java/fr/xephi/authme/security/HashUtils.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/MessageDigestAlgorithm.java b/project/module-security/src/main/java/fr/xephi/authme/security/MessageDigestAlgorithm.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/MessageDigestAlgorithm.java rename to project/module-security/src/main/java/fr/xephi/authme/security/MessageDigestAlgorithm.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/PasswordSecurity.java b/project/module-security/src/main/java/fr/xephi/authme/security/PasswordSecurity.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/PasswordSecurity.java rename to project/module-security/src/main/java/fr/xephi/authme/security/PasswordSecurity.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Argon2.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Argon2.java similarity index 94% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Argon2.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Argon2.java index e002886b..cdcc135b 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Argon2.java +++ b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Argon2.java @@ -2,8 +2,8 @@ package fr.xephi.authme.security.crypts; import de.mkammerer.argon2.Argon2Constants; import de.mkammerer.argon2.Argon2Factory; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.crypts.description.HasSalt; import fr.xephi.authme.security.crypts.description.Recommendation; import fr.xephi.authme.security.crypts.description.SaltType; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/BCrypt.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/BCrypt.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/BCrypt.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/BCrypt.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/BCrypt2y.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/BCrypt2y.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/BCrypt2y.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/BCrypt2y.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/BCryptBasedHash.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/BCryptBasedHash.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/BCryptBasedHash.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/BCryptBasedHash.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/BCryptHasher.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/BCryptHasher.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/BCryptHasher.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/BCryptHasher.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/CmwCrypt.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/CmwCrypt.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/CmwCrypt.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/CmwCrypt.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/CrazyCrypt1.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/CrazyCrypt1.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/CrazyCrypt1.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/CrazyCrypt1.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/DoubleMd5.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/DoubleMd5.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/DoubleMd5.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/DoubleMd5.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/EncryptionMethod.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/EncryptionMethod.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/EncryptionMethod.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/EncryptionMethod.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/HashedPassword.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/HashedPassword.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/HashedPassword.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/HashedPassword.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/HexSaltedMethod.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/HexSaltedMethod.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/HexSaltedMethod.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/HexSaltedMethod.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Ipb3.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Ipb3.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Ipb3.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Ipb3.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Ipb4.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Ipb4.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Ipb4.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Ipb4.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Joomla.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Joomla.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Joomla.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Joomla.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Md5.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Md5.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Md5.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Md5.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Md5vB.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Md5vB.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Md5vB.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Md5vB.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/MyBB.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/MyBB.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/MyBB.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/MyBB.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/NoCrypt.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/NoCrypt.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/NoCrypt.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/NoCrypt.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2.java similarity index 95% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2.java index c79647ab..4c22589b 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2.java +++ b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2.java @@ -4,8 +4,8 @@ import com.google.common.primitives.Ints; import de.rtner.misc.BinTools; import de.rtner.security.auth.spi.PBKDF2Engine; import de.rtner.security.auth.spi.PBKDF2Parameters; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.crypts.description.Recommendation; import fr.xephi.authme.security.crypts.description.Usage; import fr.xephi.authme.settings.Settings; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2Django.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2Django.java similarity index 94% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2Django.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2Django.java index a0877cd4..c430ca7e 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2Django.java +++ b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Pbkdf2Django.java @@ -3,8 +3,8 @@ package fr.xephi.authme.security.crypts; import com.google.common.primitives.Ints; import de.rtner.security.auth.spi.PBKDF2Engine; import de.rtner.security.auth.spi.PBKDF2Parameters; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.crypts.description.AsciiRestricted; import java.util.Base64; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/PhpBB.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/PhpBB.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/PhpBB.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/PhpBB.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/PhpFusion.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/PhpFusion.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/PhpFusion.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/PhpFusion.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/RoyalAuth.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/RoyalAuth.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/RoyalAuth.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/RoyalAuth.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Salted2Md5.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Salted2Md5.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Salted2Md5.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Salted2Md5.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/SaltedSha512.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/SaltedSha512.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/SaltedSha512.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/SaltedSha512.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/SeparateSaltMethod.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/SeparateSaltMethod.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/SeparateSaltMethod.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/SeparateSaltMethod.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Sha1.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Sha1.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Sha1.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Sha1.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Sha256.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Sha256.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Sha256.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Sha256.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Sha512.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Sha512.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Sha512.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Sha512.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Smf.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Smf.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Smf.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Smf.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/TwoFactor.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/TwoFactor.java similarity index 98% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/TwoFactor.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/TwoFactor.java index 67b22c78..551c2a14 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/TwoFactor.java +++ b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/TwoFactor.java @@ -4,8 +4,8 @@ import com.google.common.escape.Escaper; import com.google.common.io.BaseEncoding; import com.google.common.net.UrlEscapers; import com.google.common.primitives.Ints; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.crypts.description.HasSalt; import fr.xephi.authme.security.crypts.description.Recommendation; import fr.xephi.authme.security.crypts.description.SaltType; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/UnsaltedMethod.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/UnsaltedMethod.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/UnsaltedMethod.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/UnsaltedMethod.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/UsernameSaltMethod.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/UsernameSaltMethod.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/UsernameSaltMethod.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/UsernameSaltMethod.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Wbb3.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Wbb3.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Wbb3.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Wbb3.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Wbb4.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Wbb4.java similarity index 96% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Wbb4.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Wbb4.java index a55a2d48..50e4a78b 100644 --- a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Wbb4.java +++ b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Wbb4.java @@ -2,8 +2,8 @@ package fr.xephi.authme.security.crypts; import at.favre.lib.crypto.bcrypt.BCrypt; import at.favre.lib.crypto.bcrypt.IllegalBCryptFormatException; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.logger.ConsoleLogger; +import fr.xephi.authme.logger.ConsoleLoggerFactory; import fr.xephi.authme.security.crypts.description.HasSalt; import fr.xephi.authme.security.crypts.description.Recommendation; import fr.xephi.authme.security.crypts.description.SaltType; diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Whirlpool.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Whirlpool.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Whirlpool.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Whirlpool.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Wordpress.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/Wordpress.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/Wordpress.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/Wordpress.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/XAuth.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/XAuth.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/XAuth.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/XAuth.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/XfBCrypt.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/XfBCrypt.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/XfBCrypt.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/XfBCrypt.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/AsciiRestricted.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/AsciiRestricted.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/AsciiRestricted.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/AsciiRestricted.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/HasSalt.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/HasSalt.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/HasSalt.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/HasSalt.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/Recommendation.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/Recommendation.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/Recommendation.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/Recommendation.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/SaltType.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/SaltType.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/SaltType.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/SaltType.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/Usage.java b/project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/Usage.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/crypts/description/Usage.java rename to project/module-security/src/main/java/fr/xephi/authme/security/crypts/description/Usage.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/totp/GenerateTotpService.java b/project/module-security/src/main/java/fr/xephi/authme/security/totp/GenerateTotpService.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/totp/GenerateTotpService.java rename to project/module-security/src/main/java/fr/xephi/authme/security/totp/GenerateTotpService.java diff --git a/plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/totp/TotpAuthenticator.java b/project/module-security/src/main/java/fr/xephi/authme/security/totp/TotpAuthenticator.java similarity index 100% rename from plugin/platform-bukkit/src/main/java/fr/xephi/authme/security/totp/TotpAuthenticator.java rename to project/module-security/src/main/java/fr/xephi/authme/security/totp/TotpAuthenticator.java diff --git a/project/module-util/build.gradle.kts b/project/module-util/build.gradle.kts index bf78ed70..77ca76a6 100644 --- a/project/module-util/build.gradle.kts +++ b/project/module-util/build.gradle.kts @@ -1,5 +1,6 @@ dependencies { compileOnly(project(":project:module-logger")) + compileOnly(project(":project:module-common")) compileOnly(libs.guava) // String comparison library. Used for dynamic help system. implementation("net.ricecode:string-similarity:1.0.0")