mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-07 17:28:03 +08: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