mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-01 05:57:50 +01:00
Fixed NPE on Bungee systems after PostAnalysisHtmlWebAPI fail before analysis is run. #411 Version bump (4.0.6)
This commit is contained in:
parent
b3d930e68b
commit
2c2fc24643
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.djrapitops</groupId>
|
||||
<artifactId>Plan</artifactId>
|
||||
<version>4.0.5</version>
|
||||
<version>4.0.6</version>
|
||||
<packaging>jar</packaging>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
@ -20,10 +20,7 @@ import main.java.com.djrapitops.plan.systems.info.parsing.InspectPageParser;
|
||||
import main.java.com.djrapitops.plan.systems.processing.Processor;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.PageCache;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.WebServer;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.response.AnalysisPageResponse;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.response.InspectPageResponse;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.response.InternalErrorResponse;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.response.Response;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.response.*;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.theme.Theme;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.webapi.WebAPIManager;
|
||||
import main.java.com.djrapitops.plan.systems.webserver.webapi.bukkit.AnalysisReadyWebAPI;
|
||||
@ -200,7 +197,12 @@ public class BukkitInformationManager extends InformationManager {
|
||||
@Override
|
||||
public String getAnalysisHtml() {
|
||||
if (analysisData == null) {
|
||||
throw new NullPointerException("Analysis Data has not been cached.");
|
||||
analysis.runAnalysis(this);
|
||||
ErrorResponse analysisRefreshPage = new ErrorResponse();
|
||||
analysisRefreshPage.setTitle("Analysis is being refreshed..");
|
||||
analysisRefreshPage.setParagraph("<meta http-equiv=\"refresh\" content=\"25\" /><i class=\"fa fa-refresh fa-spin\" aria-hidden=\"true\"></i> Analysis is being run, refresh the page after a few seconds.. (F5)");
|
||||
analysisRefreshPage.replacePlaceholders();
|
||||
return analysisRefreshPage.getContent();
|
||||
}
|
||||
try {
|
||||
return Theme.replaceColors(new AnalysisPageParser(analysisData, plugin).parse());
|
||||
|
@ -1,4 +1,4 @@
|
||||
name: Plan
|
||||
author: Rsl1122
|
||||
main: main.java.com.djrapitops.plan.PlanBungee
|
||||
version: 4.0.5
|
||||
version: 4.0.6
|
@ -1,7 +1,7 @@
|
||||
name: Plan
|
||||
author: Rsl1122
|
||||
main: main.java.com.djrapitops.plan.Plan
|
||||
version: 4.0.5
|
||||
version: 4.0.6
|
||||
softdepend:
|
||||
- OnTime
|
||||
- EssentialsX
|
||||
|
Loading…
Reference in New Issue
Block a user