Fixed ClassCastExceptions related to InspectResponse #458

This commit is contained in:
Rsl1122 2017-12-06 15:42:30 +02:00
parent d3bf6b4063
commit 8d3afc9286
2 changed files with 3 additions and 3 deletions

View File

@ -189,7 +189,7 @@ public class BukkitInformationManager extends InformationManager {
} else { } else {
pluginsTabContents.put(uuid, contents); pluginsTabContents.put(uuid, contents);
Response inspectResponse = PageCache.loadPage("inspectPage: " + uuid); Response inspectResponse = PageCache.loadPage("inspectPage: " + uuid);
if (inspectResponse != null) { if (inspectResponse != null && inspectResponse instanceof InspectPageResponse) {
((InspectPageResponse) inspectResponse).setInspectPagePluginsTab(contents); ((InspectPageResponse) inspectResponse).setInspectPagePluginsTab(contents);
} }
} }

View File

@ -315,7 +315,7 @@ public class BungeeInformationManager extends InformationManager {
perServerPluginsTab.put(serverUUID, html); perServerPluginsTab.put(serverUUID, html);
pluginsTabContent.put(uuid, perServerPluginsTab); pluginsTabContent.put(uuid, perServerPluginsTab);
Response inspectResponse = PageCache.loadPage("inspectPage: " + uuid); Response inspectResponse = PageCache.loadPage("inspectPage: " + uuid);
if (inspectResponse != null) { if (inspectResponse != null && inspectResponse instanceof InspectPageResponse) {
((InspectPageResponse) inspectResponse).setInspectPagePluginsTab(getPluginsTabContent(uuid)); ((InspectPageResponse) inspectResponse).setInspectPagePluginsTab(getPluginsTabContent(uuid));
} }
} }