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

@ -54,7 +54,7 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>9.5</version>
<version>9.7</version>
<scope>compile</scope>
</dependency>
<!-- Mojang depends -->
@ -278,13 +278,13 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.5.0</version>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>9.5</version>
<version>9.7</version>
<scope>test</scope>
</dependency>
</dependencies>

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");