diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index 6fa903336..d747e7ef4 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -205,7 +205,6 @@ public class AuthMe extends JavaPlugin { if(!SystemUtils.isJavaVersionAtLeast(1.8f)) { throw new IllegalStateException("You need Java 1.8 or above to run this plugin!"); } - OnStartupTasks.verifyIfLegacyJarIsNeeded(); // Create plugin folder getDataFolder().mkdir(); diff --git a/src/main/java/fr/xephi/authme/initialization/OnStartupTasks.java b/src/main/java/fr/xephi/authme/initialization/OnStartupTasks.java index 0e2295a95..947777f84 100644 --- a/src/main/java/fr/xephi/authme/initialization/OnStartupTasks.java +++ b/src/main/java/fr/xephi/authme/initialization/OnStartupTasks.java @@ -116,24 +116,6 @@ public class OnStartupTasks { }, 1, TICKS_PER_MINUTE * settings.getProperty(EmailSettings.DELAY_RECALL)); } - /** - * Displays a hint to use the legacy AuthMe JAR if AuthMe could not be started - * because Gson or newer Guava classes were not found. - */ - public static void verifyIfLegacyJarIsNeeded() { - try { - Class[] classes = { - com.google.common.base.MoreObjects.class, // < 1.12 Minecraft - com.google.gson.Gson.class // < 1.7 Minecraft - }; - } catch (NoClassDefFoundError e) { - ConsoleLogger.warning("YOU MUST DOWNLOAD THE LEGACY JAR TO USE AUTHME ON YOUR SERVER"); - ConsoleLogger.warning("Get authme-legacy.jar from http://ci.xephi.fr/job/AuthMeReloaded/"); - ConsoleLogger.warning("Reason: could not load class '" + e.getMessage() + "'"); - throw e; - } - } - /** * Returns whether the hash algorithm is deprecated and won't be able * to be actively used anymore in 5.4. diff --git a/src/test/java/fr/xephi/authme/initialization/OnStartupTasksTest.java b/src/test/java/fr/xephi/authme/initialization/OnStartupTasksTest.java index 245855702..e3febf41f 100644 --- a/src/test/java/fr/xephi/authme/initialization/OnStartupTasksTest.java +++ b/src/test/java/fr/xephi/authme/initialization/OnStartupTasksTest.java @@ -1,32 +1,16 @@ package fr.xephi.authme.initialization; -import fr.xephi.authme.TestHelper; import fr.xephi.authme.security.HashAlgorithm; import org.junit.Test; -import java.util.logging.Logger; - import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; -import static org.mockito.Mockito.verifyZeroInteractions; /** * Test for {@link OnStartupTasks}. */ public class OnStartupTasksTest { - @Test - public void shouldNotDisplayLegacyHintForWrongCause() { - // given - Logger logger = TestHelper.setupLogger(); - - // when - OnStartupTasks.verifyIfLegacyJarIsNeeded(); - - // then - verifyZeroInteractions(logger); - } - @Test public void shouldCheckIfHashIsDeprecatedIn54() { // given / when / then