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> <dependency>
<groupId>org.ow2.asm</groupId> <groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId> <artifactId>asm</artifactId>
<version>9.4</version> <version>9.5</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- Mojang depends --> <!-- 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'."); 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; return;
} }
if (javaVersion > 64.0) { if (javaVersion > 65.0) {
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 20 is supported."); System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 21 is supported.");
return; return;
} }
String javaVersionName = System.getProperty("java.version"); String javaVersionName = System.getProperty("java.version");