mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-24 03:25:29 +01:00
Remove Java 8 warning
It's required, so the JVM will warn you for me
This commit is contained in:
parent
b4f9c501b3
commit
b00ae2ff15
@ -60,17 +60,4 @@ public class Util {
|
||||
public static boolean isUsingSpigot() {
|
||||
return Bukkit.getServer().getVersion().contains("Spigot");
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the currently running major Java version.
|
||||
* @return The version or -1 if it could not be found
|
||||
*/
|
||||
public static int getJavaVersion() {
|
||||
try {
|
||||
String version = Runtime.class.getPackage().getSpecificationVersion();
|
||||
return (int) (Double.parseDouble(version) * 10 % 10);
|
||||
} catch (Throwable ex) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,6 @@ import com.comphenix.protocol.updater.Updater.UpdateType;
|
||||
import com.comphenix.protocol.utility.ChatExtensions;
|
||||
import com.comphenix.protocol.utility.EnhancerFactory;
|
||||
import com.comphenix.protocol.utility.MinecraftVersion;
|
||||
import com.comphenix.protocol.utility.Util;
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Sets;
|
||||
@ -155,13 +154,6 @@ public class ProtocolLib extends JavaPlugin {
|
||||
logger = getLogger();
|
||||
ProtocolLogger.init(this);
|
||||
|
||||
int java = Util.getJavaVersion();
|
||||
if (java != -1 && java < 8 && !getConfig().getBoolean("ignoreJava", false)) {
|
||||
logger.warning("Detected outdated Java version: Java " + java);
|
||||
logger.warning("Future versions of ProtocolLib and Minecraft will require Java 8 or higher");
|
||||
logger.warning("Update as soon as possible.");
|
||||
}
|
||||
|
||||
// Initialize enhancer factory
|
||||
EnhancerFactory.getInstance().setClassLoader(getClassLoader());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user