This commit is contained in:
MattBDev 2016-07-29 21:40:02 -04:00
parent 610e204d12
commit 09994724db

View File

@ -369,8 +369,11 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
PlayerEvents main = new PlayerEvents(); PlayerEvents main = new PlayerEvents();
getServer().getPluginManager().registerEvents(main, this); getServer().getPluginManager().registerEvents(main, this);
try { try {
getServer().getClass().getMethod("spigot");
getServer().getPluginManager().registerEvents(new EntitySpawnListener(), this); 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)) { if (PS.get().checkVersion(getServerVersion(), 1, 8, 0)) {
try { try {
getServer().getPluginManager().registerEvents(new PlayerEvents_1_8(), this); getServer().getPluginManager().registerEvents(new PlayerEvents_1_8(), this);