From 300a621e1c64c0e354b5185bda1fe1a706e5ea30 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Wed, 30 Dec 2015 22:28:45 +0100 Subject: [PATCH] cleanup --- pom.xml | 1 + .../executable/authme/GetIpCommand.java | 10 +++---- .../executable/authme/LastLoginCommand.java | 2 -- .../executable/authme/ReloadCommand.java | 8 +++--- .../authme/UnregisterAdminCommand.java | 18 ++++++------- .../fr/xephi/authme/security/crypts/MD5.java | 4 --- .../command/CommandInitializerTest.java | 26 +++++++++---------- 7 files changed, 32 insertions(+), 37 deletions(-) diff --git a/pom.xml b/pom.xml index f097f789..9e99f8a6 100644 --- a/pom.xml +++ b/pom.xml @@ -259,6 +259,7 @@ 2.10.3 fr.xephi.authme.api:* + fr.xephi.authme:* diff --git a/src/main/java/fr/xephi/authme/command/executable/authme/GetIpCommand.java b/src/main/java/fr/xephi/authme/command/executable/authme/GetIpCommand.java index 19299af7..7554d0fa 100644 --- a/src/main/java/fr/xephi/authme/command/executable/authme/GetIpCommand.java +++ b/src/main/java/fr/xephi/authme/command/executable/authme/GetIpCommand.java @@ -1,14 +1,14 @@ package fr.xephi.authme.command.executable.authme; +import java.util.List; + +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + import fr.xephi.authme.AuthMe; import fr.xephi.authme.command.CommandService; import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.util.Utils; -import org.bukkit.Bukkit; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -import java.util.List; public class GetIpCommand implements ExecutableCommand { diff --git a/src/main/java/fr/xephi/authme/command/executable/authme/LastLoginCommand.java b/src/main/java/fr/xephi/authme/command/executable/authme/LastLoginCommand.java index 8a8fe851..434a648e 100644 --- a/src/main/java/fr/xephi/authme/command/executable/authme/LastLoginCommand.java +++ b/src/main/java/fr/xephi/authme/command/executable/authme/LastLoginCommand.java @@ -1,11 +1,9 @@ package fr.xephi.authme.command.executable.authme; -import fr.xephi.authme.AuthMe; import fr.xephi.authme.cache.auth.PlayerAuth; import fr.xephi.authme.command.CommandService; import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.output.MessageKey; -import fr.xephi.authme.output.Messages; import org.bukkit.command.CommandSender; import java.util.Date; diff --git a/src/main/java/fr/xephi/authme/command/executable/authme/ReloadCommand.java b/src/main/java/fr/xephi/authme/command/executable/authme/ReloadCommand.java index d1f4b31b..7e4ad2b1 100644 --- a/src/main/java/fr/xephi/authme/command/executable/authme/ReloadCommand.java +++ b/src/main/java/fr/xephi/authme/command/executable/authme/ReloadCommand.java @@ -1,5 +1,9 @@ package fr.xephi.authme.command.executable.authme; +import java.util.List; + +import org.bukkit.command.CommandSender; + import fr.xephi.authme.AuthMe; import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.command.CommandService; @@ -7,10 +11,6 @@ import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.output.MessageKey; import fr.xephi.authme.output.Messages; import fr.xephi.authme.settings.Settings; -import fr.xephi.authme.util.Profiler; -import org.bukkit.command.CommandSender; - -import java.util.List; public class ReloadCommand implements ExecutableCommand { diff --git a/src/main/java/fr/xephi/authme/command/executable/authme/UnregisterAdminCommand.java b/src/main/java/fr/xephi/authme/command/executable/authme/UnregisterAdminCommand.java index 35508ca8..dc5cd471 100644 --- a/src/main/java/fr/xephi/authme/command/executable/authme/UnregisterAdminCommand.java +++ b/src/main/java/fr/xephi/authme/command/executable/authme/UnregisterAdminCommand.java @@ -1,5 +1,14 @@ package fr.xephi.authme.command.executable.authme; +import java.util.List; + +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.scheduler.BukkitScheduler; +import org.bukkit.scheduler.BukkitTask; + import fr.xephi.authme.AuthMe; import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.cache.auth.PlayerCache; @@ -7,19 +16,10 @@ import fr.xephi.authme.cache.limbo.LimboCache; import fr.xephi.authme.command.CommandService; import fr.xephi.authme.command.ExecutableCommand; import fr.xephi.authme.output.MessageKey; -import fr.xephi.authme.output.Messages; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.task.MessageTask; import fr.xephi.authme.task.TimeoutTask; import fr.xephi.authme.util.Utils; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; -import org.bukkit.scheduler.BukkitScheduler; -import org.bukkit.scheduler.BukkitTask; - -import java.util.List; /** * Admin command to unregister a player. diff --git a/src/main/java/fr/xephi/authme/security/crypts/MD5.java b/src/main/java/fr/xephi/authme/security/crypts/MD5.java index 22164a53..50bb7d97 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/MD5.java +++ b/src/main/java/fr/xephi/authme/security/crypts/MD5.java @@ -1,10 +1,6 @@ package fr.xephi.authme.security.crypts; import fr.xephi.authme.security.HashUtils; -import fr.xephi.authme.security.crypts.description.HasSalt; -import fr.xephi.authme.security.crypts.description.Recommendation; -import fr.xephi.authme.security.crypts.description.SaltType; -import fr.xephi.authme.security.crypts.description.Usage; public class MD5 extends UnsaltedMethod { diff --git a/src/test/java/fr/xephi/authme/command/CommandInitializerTest.java b/src/test/java/fr/xephi/authme/command/CommandInitializerTest.java index 5a8d5d85..f8b0d256 100644 --- a/src/test/java/fr/xephi/authme/command/CommandInitializerTest.java +++ b/src/test/java/fr/xephi/authme/command/CommandInitializerTest.java @@ -1,12 +1,11 @@ package fr.xephi.authme.command; -import fr.xephi.authme.permission.AdminPermission; -import fr.xephi.authme.permission.PermissionNode; -import fr.xephi.authme.util.StringUtils; -import fr.xephi.authme.util.WrapperMock; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import static fr.xephi.authme.permission.DefaultPermission.OP_ONLY; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.nullValue; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.Arrays; @@ -18,12 +17,13 @@ import java.util.Map; import java.util.Set; import java.util.regex.Pattern; -import static fr.xephi.authme.permission.DefaultPermission.OP_ONLY; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.nullValue; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; +import org.junit.BeforeClass; +import org.junit.Test; + +import fr.xephi.authme.permission.AdminPermission; +import fr.xephi.authme.permission.PermissionNode; +import fr.xephi.authme.util.StringUtils; +import fr.xephi.authme.util.WrapperMock; /** * Test for {@link CommandInitializer} to guarantee the integrity of the defined commands.