Remove Java 8 warning

It's required, so the JVM will warn you for me
This commit is contained in:
Dan Mulloy 2017-05-14 21:46:18 -04:00
parent b4f9c501b3
commit b00ae2ff15
2 changed files with 0 additions and 21 deletions

View File

@ -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;
}
}
}

View File

@ -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());