From f28420d4afc6011ca42ef24aabcea228b225e970 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sun, 12 Aug 2018 12:13:57 +0300 Subject: [PATCH] Fix CraftBukkit failing to initialize if some Spigot classes are present --- .../com/djrapitops/plan/system/tasks/BukkitTaskSystem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/system/tasks/BukkitTaskSystem.java b/Plan/src/main/java/com/djrapitops/plan/system/tasks/BukkitTaskSystem.java index d73db3f6e..dfe9bd493 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/tasks/BukkitTaskSystem.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/tasks/BukkitTaskSystem.java @@ -30,11 +30,13 @@ public class BukkitTaskSystem extends ServerTaskSystem { @Override public void enable() { super.enable(); - if (Check.isSpigotAvailable()) { + try { PingCountTimer pingCountTimer = new PingCountTimer(); ((Plan) plugin).registerListener(pingCountTimer); RunnableFactory.createNew("PingCountTimer", pingCountTimer) .runTaskTimer(20L, PingCountTimer.PING_INTERVAL); + } catch (ExceptionInInitializerError | NoClassDefFoundError ignore) { + // Running CraftBukkit } }