diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java index 2c1fb268b..d7c5da06b 100644 --- a/src/main/java/org/maxgamer/quickshop/QuickShop.java +++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java @@ -975,9 +975,14 @@ public class QuickShop extends JavaPlugin { } } - @SuppressWarnings("UnusedAssignment") + private void updateConfig(int selectedVersion) { //fixConfiguration(); + GameVersion gameVersion = getRuntimeCatcher().getGameVersion(); + if (gameVersion == GameVersion.v1_16_R1 || gameVersion == GameVersion.v1_16_R2 || gameVersion == GameVersion.UNKNOWN) { + getLogger().warning("Force using QS Matcher due to a spigot bug: https://hub.spigotmc.org/jira/browse/SPIGOT-5063"); + getConfig().set("matcher.work-type", 0); + } String serverUUID = getConfig().getString("server-uuid"); if (serverUUID == null || serverUUID.isEmpty()) { UUID uuid = UUID.randomUUID(); diff --git a/src/main/java/org/maxgamer/quickshop/RuntimeCatcher.java b/src/main/java/org/maxgamer/quickshop/RuntimeCatcher.java index ea6b288da..1c11eb0c3 100644 --- a/src/main/java/org/maxgamer/quickshop/RuntimeCatcher.java +++ b/src/main/java/org/maxgamer/quickshop/RuntimeCatcher.java @@ -44,11 +44,6 @@ public class RuntimeCatcher { plugin.getLogger().warning("Alert: QuickShop may not fully support your current version " + nmsVersion + "/" + ReflectFactory.getServerVersion() + ", Some features may not working."); } - if (gameVersion == GameVersion.v1_16_R1 || gameVersion == GameVersion.v1_16_R2 || gameVersion == GameVersion.UNKNOWN) { - plugin.getLogger().warning("Force using QS Matcher due to a spigot bug: https://hub.spigotmc.org/jira/browse/SPIGOT-5063"); - plugin.getConfig().set("matcher.work-type", 0); - plugin.saveConfig(); - } if (!isSpigotBasedServer(plugin)) { plugin.getLogger().severe("FATAL: QSRR can only be run on Spigot servers and forks of Spigot!"); throw new RuntimeException("Server must be Spigot based, Don't use CraftBukkit!");