mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-05 10:20:23 +01: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
|
@Override
|
||||||
public void enable() {
|
public void enable() {
|
||||||
super.enable();
|
super.enable();
|
||||||
if (Check.isSpigotAvailable()) {
|
try {
|
||||||
PingCountTimer pingCountTimer = new PingCountTimer();
|
PingCountTimer pingCountTimer = new PingCountTimer();
|
||||||
((Plan) plugin).registerListener(pingCountTimer);
|
((Plan) plugin).registerListener(pingCountTimer);
|
||||||
RunnableFactory.createNew("PingCountTimer", pingCountTimer)
|
RunnableFactory.createNew("PingCountTimer", pingCountTimer)
|
||||||
.runTaskTimer(20L, PingCountTimer.PING_INTERVAL);
|
.runTaskTimer(20L, PingCountTimer.PING_INTERVAL);
|
||||||
|
} catch (ExceptionInInitializerError | NoClassDefFoundError ignore) {
|
||||||
|
// Running CraftBukkit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user