Fix CraftBukkit not working due to ping task

This commit is contained in:
Rsl1122 2018-07-26 15:05:05 +03:00
parent 4800728098
commit abeb841378

View File

@ -30,11 +30,13 @@ public class BukkitTaskSystem extends ServerTaskSystem {
@Override @Override
public void enable() { public void enable() {
super.enable(); super.enable();
if (Check.isSpigotAvailable()) {
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);
} }
}
@Override @Override
public void disable() { public void disable() {