Added more debug for Bungee-Bukkit systems

This commit is contained in:
Rsl1122 2017-11-19 12:46:18 +02:00
parent 30ebf9a59b
commit d0c88ddd59
2 changed files with 13 additions and 1 deletions

View File

@ -38,9 +38,12 @@ public class APIResponseHandler {
String target = request.getTarget();
String[] args = target.split("/");
if ("/favicon.ico".equals(target)) {
if ("/favicon.ico".equalsIgnoreCase(target)) {
return PageCache.loadPage("Redirect: favicon", () -> new RedirectResponse("https://puu.sh/tK0KL/6aa2ba141b.ico"));
}
if ("/debug".equalsIgnoreCase(target)) {
return new DebugPageResponse();
}
if (target.endsWith(".css")) {
return PageCache.loadPage(target + "css", () -> new CSSResponse(target));
}

View File

@ -105,6 +105,15 @@ public class DebugPageResponse extends ErrorResponse {
Collection<ServerInfo> online = serverInfoManager.getOnlineBukkitServers();
Collection<ServerInfo> bukkitServers = serverInfoManager.getBukkitServers();
if (!bukkitServers.isEmpty()) {
content.append("<p>If your issue is about Bungee-Bukkit connection relations, please include the following debug information of available servers as well: ");
for (ServerInfo info : bukkitServers) {
String link = Html.LINK.parse(info.getWebAddress() + "/debug", info.getWebAddress() + "/debug");
content.append(link).append("<br>");
}
content.append("</p>");
}
content.append("<pre>### Bungee Configuration<br>");
content.append("Server name | Online | Address | UUID<br>")