From c53cdfdaf546e86c452d1c0da508d6c06fc53506 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Sun, 28 Apr 2019 01:58:21 +0200 Subject: [PATCH] Check PluginLib version before checking MC version --- .../Minepacks/Bukkit/Minepacks.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java index 8361dfb..06b3678 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java @@ -85,6 +85,14 @@ public static Minepacks getInstance() public void onEnable() { Utils.warnOnJava_1_7(getLogger()); + + if(PluginLib.getInstance().getVersion().olderThan(new Version("1.0.8-SNAPSHOT"))) + { + getLogger().warning("You are using an outdated version of the PCGF PluginLib! Please update it!"); + setEnabled(false); + return; + } + //region Check compatibility with used minecraft version if(MCVersion.is(MCVersion.UNKNOWN) || MCVersion.isNewerThan(MCVersion.MC_NMS_1_14_R1)) { @@ -96,13 +104,6 @@ public void onEnable() } //endregion - if(PluginLib.getInstance().getVersion().olderThan(new Version("1.0.8-SNAPSHOT"))) - { - getLogger().warning("You are using an outdated version of the PCGF PluginLib! Please update it!"); - setEnabled(false); - return; - } - //region check if a plugin folder exists (was renamed from MinePacks to Minepacks with the V2.0 update) if(!getDataFolder().exists()) {