Skip to content

Commit b00ae2f

Browse files
committed
Remove Java 8 warning
It's required, so the JVM will warn you for me
1 parent b4f9c50 commit b00ae2f

File tree

2 files changed

+0
-21
lines changed
  • modules

2 files changed

+0
-21
lines changed

modules/API/src/main/java/com/comphenix/protocol/utility/Util.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,4 @@ public static <E> List<E> asList(E... elements) {
6060
public static boolean isUsingSpigot() {
6161
return Bukkit.getServer().getVersion().contains("Spigot");
6262
}
63-
64-
/**
65-
* Gets the currently running major Java version.
66-
* @return The version or -1 if it could not be found
67-
*/
68-
public static int getJavaVersion() {
69-
try {
70-
String version = Runtime.class.getPackage().getSpecificationVersion();
71-
return (int) (Double.parseDouble(version) * 10 % 10);
72-
} catch (Throwable ex) {
73-
return -1;
74-
}
75-
}
7663
}

modules/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLib.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import com.comphenix.protocol.utility.ChatExtensions;
5353
import com.comphenix.protocol.utility.EnhancerFactory;
5454
import com.comphenix.protocol.utility.MinecraftVersion;
55-
import com.comphenix.protocol.utility.Util;
5655
import com.google.common.base.Splitter;
5756
import com.google.common.collect.Iterables;
5857
import com.google.common.collect.Sets;
@@ -155,13 +154,6 @@ public void onLoad() {
155154
logger = getLogger();
156155
ProtocolLogger.init(this);
157156

158-
int java = Util.getJavaVersion();
159-
if (java != -1 && java < 8 && !getConfig().getBoolean("ignoreJava", false)) {
160-
logger.warning("Detected outdated Java version: Java " + java);
161-
logger.warning("Future versions of ProtocolLib and Minecraft will require Java 8 or higher");
162-
logger.warning("Update as soon as possible.");
163-
}
164-
165157
// Initialize enhancer factory
166158
EnhancerFactory.getInstance().setClassLoader(getClassLoader());
167159

0 commit comments

Comments
 (0)