Add support for Java 22

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-03-29 21:23:37 +11:00
parent 0223e7ff73
commit e0274e7202
2 changed files with 5 additions and 5 deletions

View File

@ -165,8 +165,8 @@ public class Main {
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 > 65.0) {
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 21 is supported.");
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");