Add support for Java 21

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2023-09-10 08:38:53 +10:00
parent dc3bd245f7
commit 43bd62c7f5
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.4</version>
<version>9.5</version>
<scope>compile</scope>
</dependency>
<!-- Mojang depends -->

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 > 64.0) {
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 20 is supported.");
if (javaVersion > 65.0) {
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 21 is supported.");
return;
}
String javaVersionName = System.getProperty("java.version");