Added 1.21 support and fixed paperweight issues for Java 17 versions

This commit is contained in:
Auxilor
2024-06-18 20:43:04 +01:00
parent 80afa9127f
commit 3a0e1eaf4d
12 changed files with 36 additions and 5 deletions

View File

@@ -37,11 +37,20 @@ public class Prerequisite {
"Requires server to have ProtocolLib"
);
/**
* Requires the server to be running 1.21.
*/
public static final Prerequisite HAS_1_21 = new Prerequisite(
() -> ProxyConstants.NMS_VERSION.contains("1_21"),
"Requires server to be running 1.21+"
);
/**
* Requires the server to be running 1.20.5.
*/
public static final Prerequisite HAS_1_20_5 = new Prerequisite(
() -> ProxyConstants.NMS_VERSION.contains("1_20_") && !ProxyConstants.NMS_VERSION.contains("R"),
() -> (ProxyConstants.NMS_VERSION.contains("1_20_") && !ProxyConstants.NMS_VERSION.contains("R"))
|| HAS_1_21.isMet(),
"Requires server to be running 1.20.5+"
);

View File

@@ -28,7 +28,8 @@ public final class ProxyConstants {
"v1_20_R1",
"v1_20_R2",
"v1_20_R3",
"v1_20_6"
"v1_20_6",
"v1_21"
);
private ProxyConstants() {