This commit is contained in:
Rsl1122 2017-09-28 19:21:00 +03:00
parent 3892fb6e3c
commit 3b8e460912
3 changed files with 10 additions and 6 deletions

View File

@ -81,7 +81,7 @@ public class Plan extends BukkitPlugin<Plan> implements IPlan {
private WebServer webServer;
private InformationManager infoManager;
private BukkitInformationManager infoManager;
private BukkitServerInfoManager serverInfoManager;
private ServerVariableHolder serverVariableHolder;
@ -260,6 +260,13 @@ public class Plan extends BukkitPlugin<Plan> implements IPlan {
}).runTaskTimerAsynchronously(analysisPeriod, analysisPeriod);
}
runnableFactory.createNew("PeriodicNetworkBoxRefreshTask", new AbsRunnable() {
@Override
public void run() {
infoManager.updateNetworkPageContent();
}
}).runTaskTimerAsynchronously(TimeAmount.SECOND.ticks(), TimeAmount.MINUTE.ticks() * 5L);
Benchmark.stop("Enable", "Task Registration");
}

View File

@ -317,10 +317,6 @@ public class BungeeInformationManager extends InformationManager {
return plugin.getWebServer().getAccessAddress();
}
public void askForNetWorkPageContent() {
// TODO WebAPI for network page content
}
public void cacheNetworkPageContent(UUID serverUUID, String html) {
networkPageContent.put(serverUUID, html);
}

View File

@ -126,7 +126,8 @@ public class PlanPlayerListener implements Listener {
plugin.addToProcessQueue(
new BanAndOpProcessor(uuid, player.isBanned(), player.isOp()),
new EndSessionProcessor(uuid, time)
new EndSessionProcessor(uuid, time),
new NetworkPageUpdateProcessor(plugin.getInfoManager())
);
if (cache.isFirstSession(uuid)) {