geforkt von Mirrors/Paper
SPIGOT-7839: Remove redundant Java version checks
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
60eec22bd3
Commit
b9c7f251e4
@ -162,21 +162,10 @@ public class Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
|
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) {
|
if (javaVersion > 66.0) {
|
||||||
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported.");
|
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported.");
|
||||||
return;
|
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 {
|
try {
|
||||||
// This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals
|
// This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren