From 3896bcbd6469d2fb173b5e9b214ba70d4c257dc0 Mon Sep 17 00:00:00 2001 From: vemacs Date: Mon, 18 Jan 2016 15:49:43 -0700 Subject: [PATCH] Allow skipping version check per request --- .../src/com/earth2me/essentials/Essentials.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 6508f9170..d0ca62bf4 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -153,11 +153,14 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials { execTimer.mark("I18n1"); Console.setInstance(this); - - String serverString = Bukkit.getServer().getClass().getName(); - for (int i = 1; i <= 7; i++) { - if (serverString.contains(".v1_" + i + "_R")) { - throw new Error("Outdated server. This version of Essentials will only work on Bukkit 1.8 or higher."); + + File file = new File(getDataFolder(), ".skipversion"); + if (!file.exists()) { + String serverString = Bukkit.getServer().getClass().getName(); + for (int i = 1; i <= 7; i++) { + if (serverString.contains(".v1_" + i + "_R")) { + throw new Error("Outdated server. This version of Essentials will only work on Bukkit 1.8 or higher."); + } } } final PluginManager pm = getServer().getPluginManager();