From c19c0e2aac0adef7b3ff473bb76c905da0ff0c43 Mon Sep 17 00:00:00 2001
From: Ghost_chu <2908803755@qq.com>
Date: Fri, 11 Jun 2021 17:27:10 +0800
Subject: [PATCH] Add UNKNOWN GameVersion to env checker
---
pom.xml | 2 +-
.../quickshop/util/envcheck/EnvironmentChecker.java | 12 +++++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 3170e3160..f0ac6f403 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
QuickShop
- 4.0.8.6
+ 4.0.8.7
org.maxgamer.quickshop
Ghost-chu
UTF-8
diff --git a/src/main/java/org/maxgamer/quickshop/util/envcheck/EnvironmentChecker.java b/src/main/java/org/maxgamer/quickshop/util/envcheck/EnvironmentChecker.java
index 71f36bede..5b525b73d 100644
--- a/src/main/java/org/maxgamer/quickshop/util/envcheck/EnvironmentChecker.java
+++ b/src/main/java/org/maxgamer/quickshop/util/envcheck/EnvironmentChecker.java
@@ -370,7 +370,17 @@ public final class EnvironmentChecker {
return new ResultContainer(CheckResult.PASSED, "Passed checks");
}
- @EnvCheckEntry(name = "PacketListenerAPI Conflict Test", priority = 9)
+ @EnvCheckEntry(name = "GameVersion supporting Test", priority = 9)
+ public ResultContainer gamerVersionSupportTest() {
+ String nmsVersion = Util.getNMSVersion();
+ GameVersion gameVersion = GameVersion.get(nmsVersion);
+ if (gameVersion == GameVersion.UNKNOWN) {
+ return new ResultContainer(CheckResult.WARNING, "Your Minecraft server version not tested by developers, QuickShop may ran into issues on this version.");
+ }
+ return new ResultContainer(CheckResult.PASSED, "Passed checks");
+ }
+
+ @EnvCheckEntry(name = "PacketListenerAPI Conflict Test", priority = 10)
public ResultContainer plapiConflictTest() {
if (plugin.isDisplay() && DisplayItem.getNowUsing() == DisplayType.VIRTUALITEM && Bukkit.getPluginManager().isPluginEnabled("ProtocolLib") && Bukkit.getPluginManager().isPluginEnabled("PacketListenerAPI")) {
return new ResultContainer(CheckResult.WARNING, "Virtual DisplayItem may stop working on your server. We are already aware that [PacketListenerAPI] and [ProtocolLib] are conflicting. (QuickShops requirement to send fake items). If your display is not showing, please uninstall [PacketListenerAPI].");