mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-02-17 04:11:33 +01:00
Remove legacy jar hint
This commit is contained in:
parent
e8b3bb5d9d
commit
e6e023a032
@ -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();
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user