mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-06 03:38:06 +02:00
No need for a cast
This commit is contained in:
parent
81992a5676
commit
7cce168133
@ -10,16 +10,19 @@ import org.spongepowered.api.Sponge;
|
||||
import org.spongepowered.api.scheduler.Task;
|
||||
|
||||
public class SpongeTaskSystem extends ServerTaskSystem {
|
||||
|
||||
private final PlanSponge plugin;
|
||||
|
||||
public SpongeTaskSystem(PlanSponge plugin) {
|
||||
super(plugin, new SpongeTPSCountTimer(plugin));
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
super.enable();
|
||||
PingCountTimerSponge pingCountTimer = new PingCountTimerSponge();
|
||||
((PlanSponge) plugin).registerListener(pingCountTimer);
|
||||
plugin.registerListener(pingCountTimer);
|
||||
long startDelay = TimeAmount.SECOND.ticks() * (long) Settings.PING_SERVER_ENABLE_DELAY.getNumber();
|
||||
RunnableFactory.createNew("PingCountTimer", pingCountTimer)
|
||||
.runTaskTimer(startDelay, PingCountTimerSponge.PING_INTERVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user