Updated to 1.17 and Java 16

This commit is contained in:
Auxilor
2021-06-11 11:36:58 +01:00
parent 08b5cc1612
commit 9b19cd412a
10 changed files with 288 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
package com.willfp.eco.core;
import com.willfp.eco.core.proxy.ProxyConstants;
import com.willfp.eco.util.ClassUtils;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
@@ -14,6 +15,7 @@ public class Prerequisite {
* All existing prerequisites are registered on creation.
*/
private static final List<Prerequisite> VALUES = new ArrayList<>();
/**
* Requires the server to be running an implementation of paper.
*/
@@ -22,6 +24,14 @@ public class Prerequisite {
"Requires server to be running paper (or a fork)"
);
/**
* Requires the server to be running 1.17
*/
public static final Prerequisite v1_17 = new Prerequisite(
() -> ProxyConstants.NMS_VERSION.contains("17"),
"Requires server to be running 1.17+"
);
/**
* If the necessary prerequisite condition has been met.
*/