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> <dependency>
<groupId>org.ow2.asm</groupId> <groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId> <artifactId>asm-commons</artifactId>
<version>9.5</version> <version>9.7</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- Mojang depends --> <!-- Mojang depends -->
@ -278,13 +278,13 @@
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<version>5.5.0</version> <version>5.11.0</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.ow2.asm</groupId> <groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId> <artifactId>asm-tree</artifactId>
<version>9.5</version> <version>9.7</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </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'."); 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 > 65.0) { if (javaVersion > 66.0) {
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 21 is supported."); System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported.");
return; return;
} }
String javaVersionName = System.getProperty("java.version"); String javaVersionName = System.getProperty("java.version");