From b9c7f251e4522d8102868abba9640ad993f18028 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 20 Jul 2024 10:20:27 +1000 Subject: [PATCH] SPIGOT-7839: Remove redundant Java version checks By: md_5 --- .../src/main/java/org/bukkit/craftbukkit/Main.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java b/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java index 00e90f345f..4bda6f8730 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java @@ -162,21 +162,10 @@ public class Main { } float javaVersion = Float.parseFloat(System.getProperty("java.class.version")); - if (javaVersion < 61.0) { - System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'."); - return; - } if (javaVersion > 66.0) { System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported."); return; } - String javaVersionName = System.getProperty("java.version"); - // J2SE SDK/JRE Version String Naming Convention - boolean isPreRelease = javaVersionName.contains("-"); - if (isPreRelease && javaVersion == 61.0) { - System.err.println("Unsupported Java detected (" + javaVersionName + "). You are running an outdated, pre-release version. Only general availability versions of Java are supported. Please update your Java version."); - return; - } try { // This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals