mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-18 21:32:09 +01:00
Cache Player's inspect page when it is not already cached.
This commit is contained in:
parent
f514edfc8b
commit
e6414c5c2d
@ -73,7 +73,7 @@ public class InformationManager {
|
||||
}
|
||||
|
||||
public void cachePlayer(UUID uuid) {
|
||||
PageCache.loadPage("inspectPage: "+uuid, () -> new InspectPageResponse(this, uuid));
|
||||
PageCache.loadPage("inspectPage: " + uuid, () -> new InspectPageResponse(this, uuid));
|
||||
// TODO Player page plugin tab request
|
||||
}
|
||||
|
||||
|
@ -432,9 +432,9 @@ public class WebServer {
|
||||
private Response forbiddenResponse(int permLevel, int required) {
|
||||
return PageCache.loadPage("forbidden", () ->
|
||||
new ForbiddenResponse("Unauthorized User.<br>"
|
||||
+ "Make sure your user has the correct access level.<br>"
|
||||
+ "This page requires permission level of " + required + ",<br>"
|
||||
+ "This user has permission level of " + permLevel));
|
||||
+ "Make sure your user has the correct access level.<br>"
|
||||
+ "This page requires permission level of " + required + ",<br>"
|
||||
+ "This user has permission level of " + permLevel));
|
||||
}
|
||||
|
||||
private Response rootPageResponse(WebUser user) {
|
||||
@ -476,11 +476,6 @@ public class WebServer {
|
||||
return PageCache.loadPage("notFound: " + error, () -> new NotFoundResponse(error));
|
||||
}
|
||||
|
||||
if (!infoManager.isCached(uuid)) {
|
||||
String error = "Player's data was not cached.<br>Use /plan inspect " + playerName + " to cache the Data.";
|
||||
return PageCache.loadPage("notFound: " + error, () -> new NotFoundResponse(error));
|
||||
}
|
||||
|
||||
return PageCache.loadPage("inspectPage: " + uuid, () -> new InspectPageResponse(infoManager, uuid));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user