From 20a59ddb6ed547aea4762f1f341c972f34639534 Mon Sep 17 00:00:00 2001 From: vemacs Date: Fri, 12 Jun 2015 11:22:11 -0600 Subject: [PATCH] Catch throwable for spawnerutil, move nasty warning to spawnerutil --- Essentials/src/com/earth2me/essentials/Essentials.java | 3 --- .../src/com/earth2me/essentials/utils/SpawnerUtil.java | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index c683ac454..6e4664172 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -148,9 +148,6 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials { 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."); - } final PluginManager pm = getServer().getPluginManager(); for (Plugin plugin : pm.getPlugins()) { if (plugin.getDescription().getName().startsWith("Essentials") && !plugin.getDescription().getVersion().equals(this.getDescription().getVersion()) && !plugin.getDescription().getName().equals("EssentialsAntiCheat")) { diff --git a/Essentials/src/com/earth2me/essentials/utils/SpawnerUtil.java b/Essentials/src/com/earth2me/essentials/utils/SpawnerUtil.java index a57cd901a..1c25c4457 100644 --- a/Essentials/src/com/earth2me/essentials/utils/SpawnerUtil.java +++ b/Essentials/src/com/earth2me/essentials/utils/SpawnerUtil.java @@ -33,13 +33,14 @@ public class SpawnerUtil { ItemStack is = new ItemStack(Material.MOB_SPAWNER, 1); ItemMeta meta = is.getItemMeta(); useMeta = meta instanceof BlockStateMeta; - } catch (Exception e) { + } catch (Throwable e) { useMeta = false; } if (useMeta) { ess.getLogger().info("Using BlockStateMeta for spawners"); } else { - ess.getLogger().info("Using legacy item data for spawners"); + ess.getLogger().warning("Using legacy item data for spawners"); + ess.getLogger().warning(ChatColor.RED + "UPGRADE TO SPIGOT 1.8.3 OR HIGHER FOR WORKING SPAWNERS"); } }