From 09994724db2db3f5128c245427cac898a7d65164 Mon Sep 17 00:00:00 2001 From: MattBDev Date: Fri, 29 Jul 2016 21:40:02 -0400 Subject: [PATCH] Fix #1277 --- Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java index c31409455..1f9bff3ec 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/BukkitMain.java @@ -369,8 +369,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain PlayerEvents main = new PlayerEvents(); getServer().getPluginManager().registerEvents(main, this); try { + getServer().getClass().getMethod("spigot"); getServer().getPluginManager().registerEvents(new EntitySpawnListener(), this); - } catch (Throwable ignore) {} + } catch (NoSuchMethodException ignored) { + PS.debug("Not running Spigot. Skipping EntitySpawnListener event."); + } if (PS.get().checkVersion(getServerVersion(), 1, 8, 0)) { try { getServer().getPluginManager().registerEvents(new PlayerEvents_1_8(), this);