mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-07 19:31:45 +01:00
No need for a cast
This commit is contained in:
parent
81992a5676
commit
7cce168133
@ -11,15 +11,18 @@ import org.spongepowered.api.scheduler.Task;
|
|||||||
|
|
||||||
public class SpongeTaskSystem extends ServerTaskSystem {
|
public class SpongeTaskSystem extends ServerTaskSystem {
|
||||||
|
|
||||||
|
private final PlanSponge plugin;
|
||||||
|
|
||||||
public SpongeTaskSystem(PlanSponge plugin) {
|
public SpongeTaskSystem(PlanSponge plugin) {
|
||||||
super(plugin, new SpongeTPSCountTimer(plugin));
|
super(plugin, new SpongeTPSCountTimer(plugin));
|
||||||
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void enable() {
|
public void enable() {
|
||||||
super.enable();
|
super.enable();
|
||||||
PingCountTimerSponge pingCountTimer = new PingCountTimerSponge();
|
PingCountTimerSponge pingCountTimer = new PingCountTimerSponge();
|
||||||
((PlanSponge) plugin).registerListener(pingCountTimer);
|
plugin.registerListener(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);
|
||||||
|
Loading…
Reference in New Issue
Block a user