mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-12 14:58:26 +02:00
Fix CraftBukkit failing to initialize if some Spigot classes are present
This commit is contained in:
parent
2dd8dd3ee1
commit
f28420d4af
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user