Fixed CacheInspectPageRequest debug-logging an exception message

This commit is contained in:
Rsl1122 2018-08-04 12:16:33 +03:00
parent e0b05cc169
commit c84871496c

View File

@ -46,14 +46,12 @@ public class BungeeConnectionSystem extends ConnectionSystem {
protected Server selectServerForRequest(InfoRequest infoRequest) throws NoServersException {
refreshServerMap();
Server server = null;
if (infoRequest instanceof CacheRequest) {
throw new NoServersException("Bungee should not send Cache requests.");
if (infoRequest instanceof CacheRequest || infoRequest instanceof GenerateInspectPageRequest) {
// Run locally
return ServerInfo.getServer();
} else if (infoRequest instanceof GenerateAnalysisPageRequest) {
UUID serverUUID = ((GenerateAnalysisPageRequest) infoRequest).getServerUUID();
server = bukkitServers.get(serverUUID);
} else if (infoRequest instanceof GenerateInspectPageRequest) {
// Run locally
server = ServerInfo.getServer();
}
if (server == null) {
throw new NoServersException("Proper server is not available to process request: " + infoRequest.getClass().getSimpleName());