From 9bb6e46dbb5bcaf2f9cb08aefea8d6c907e9b3f9 Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Wed, 18 Mar 2020 12:52:36 +0800 Subject: [PATCH] Fix runtimeChecker tool Former-commit-id: 49d34fc07d2f2ce9f0d881b211d3cdf4b339b4b5 --- .../org/maxgamer/quickshop/QuickShop.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java index 3a64c32bd..234359413 100644 --- a/src/main/java/org/maxgamer/quickshop/QuickShop.java +++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java @@ -551,6 +551,17 @@ public class QuickShop extends JavaPlugin { getCommand("qs").setTabCompleter(commandManager); getLogger().info("Quickshop " + getFork()); + + /* Check the running envs is support or not. */ + try { + runtimeCheck(this); + } catch (RuntimeException e) { + bootError = new BootError(e.getMessage()); + //noinspection ConstantConditions + getCommand("qs").setTabCompleter(this); //Disable tab completer + return; + } + getLogger().info("Reading the configuration..."); /* Process the config */ saveDefaultConfig(); @@ -606,15 +617,7 @@ public class QuickShop extends JavaPlugin { MsgUtil.loadEnchi18n(); MsgUtil.loadPotioni18n(); this.previewProtectionLore = MsgUtil.getMessageOfflinePlayer("quickshop-gui-preview", null); - /* Check the running envs is support or not. */ - try { - runtimeCheck(this); - } catch (RuntimeException e) { - bootError = new BootError(e.getMessage()); - //noinspection ConstantConditions - getCommand("qs").setTabCompleter(this); //Disable tab completer - return; - } + /* Load 3rd party supports */ load3rdParty();