mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-02 16:59:42 +01:00
Using correct way to register listener
This commit is contained in:
parent
8a4b23649d
commit
81992a5676
@ -18,15 +18,11 @@ public class SpongeTaskSystem extends ServerTaskSystem {
|
|||||||
@Override
|
@Override
|
||||||
public void enable() {
|
public void enable() {
|
||||||
super.enable();
|
super.enable();
|
||||||
try {
|
PingCountTimerSponge pingCountTimer = new PingCountTimerSponge();
|
||||||
PingCountTimerSponge pingCountTimer = new PingCountTimerSponge();
|
((PlanSponge) plugin).registerListener(pingCountTimer);
|
||||||
Sponge.getEventManager().registerListeners(plugin, pingCountTimer);
|
long startDelay = TimeAmount.SECOND.ticks() * (long) Settings.PING_SERVER_ENABLE_DELAY.getNumber();
|
||||||
long startDelay = TimeAmount.SECOND.ticks() * (long) Settings.PING_SERVER_ENABLE_DELAY.getNumber();
|
RunnableFactory.createNew("PingCountTimer", pingCountTimer)
|
||||||
RunnableFactory.createNew("PingCountTimer", pingCountTimer)
|
.runTaskTimer(startDelay, PingCountTimerSponge.PING_INTERVAL);
|
||||||
.runTaskTimer(startDelay, PingCountTimerSponge.PING_INTERVAL);
|
|
||||||
} catch (ExceptionInInitializerError | NoClassDefFoundError ignore) {
|
|
||||||
// Running CraftBukkit
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user