From 480055b3d70fa455e5f11c39d2b0afdb4c6aa152 Mon Sep 17 00:00:00 2001 From: vemacs Date: Fri, 5 Jun 2015 16:46:33 -0600 Subject: [PATCH] Give actually helpful error message for attempts to load on 1.7 --- Essentials/src/com/earth2me/essentials/Essentials.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 83cf99e9c..71835af21 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -136,6 +136,15 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials { @Override public void onEnable() { try { + 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."); + } + } + if (serverString.contains(".v1_8_R1.")) { + getLogger().warning("Detected Bukkit 1.8.0. Spawners will not work properly until you upgrade to 1.8.3 or higher."); + } LOGGER.setParent(this.getLogger()); execTimer = new ExecuteTimer(); execTimer.start();