From 3b8e4609128b9a72922402260e67f99452d2ad2d Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Thu, 28 Sep 2017 19:21:00 +0300 Subject: [PATCH] Fixed #297 --- Plan/src/main/java/com/djrapitops/plan/Plan.java | 9 ++++++++- .../plan/systems/info/BungeeInformationManager.java | 4 ---- .../plan/systems/listeners/PlanPlayerListener.java | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/Plan.java b/Plan/src/main/java/com/djrapitops/plan/Plan.java index 2cdfa461e..1fdf8e66f 100644 --- a/Plan/src/main/java/com/djrapitops/plan/Plan.java +++ b/Plan/src/main/java/com/djrapitops/plan/Plan.java @@ -81,7 +81,7 @@ public class Plan extends BukkitPlugin 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 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"); } diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/info/BungeeInformationManager.java b/Plan/src/main/java/com/djrapitops/plan/systems/info/BungeeInformationManager.java index 1a9dfd748..c0f2c16a3 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/info/BungeeInformationManager.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/info/BungeeInformationManager.java @@ -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); } diff --git a/Plan/src/main/java/com/djrapitops/plan/systems/listeners/PlanPlayerListener.java b/Plan/src/main/java/com/djrapitops/plan/systems/listeners/PlanPlayerListener.java index 6741655d5..00a603733 100644 --- a/Plan/src/main/java/com/djrapitops/plan/systems/listeners/PlanPlayerListener.java +++ b/Plan/src/main/java/com/djrapitops/plan/systems/listeners/PlanPlayerListener.java @@ -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)) {