added pinger-debug option to the config

This commit is contained in:
ajgeiss0702
2020-07-06 09:32:07 -07:00
parent 9ad79b25ee
commit 762b9fbf30
2 changed files with 20 additions and 7 deletions
+12 -6
View File
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import net.md_5.bungee.api.Callback; import net.md_5.bungee.api.Callback;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.ServerPing; import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;
@@ -36,12 +37,17 @@ public class Server {
public void done(ServerPing result, Throwable error) { public void done(ServerPing result, Throwable error) {
online = error == null; online = error == null;
/*if(error != null) {
ProxyServer.getInstance().getLogger().info("[ajQueue] [pinger] Status: "+online+". Error: "); if(Manager.getInstance().pl.config.getBoolean("pinger-debug")) {
error.printStackTrace(); if(error != null) {
} else { ProxyServer.getInstance().getLogger().info("[ajQueue] [pinger] ["+name+"] Status: "+online+". Error: ");
ProxyServer.getInstance().getLogger().info("[ajQueue] [pinger] Status: "+online+". motd: "+result.getDescriptionComponent()); error.printStackTrace();
}*/ } else {
ProxyServer.getInstance().getLogger().info("[ajQueue] [pinger] ["+name+"] Status: "+online+". motd: "
+result.getDescriptionComponent()+" players:"+result.getPlayers());
}
}
if(lastUpdate == -1) { if(lastUpdate == -1) {
+8 -1
View File
@@ -1,5 +1,5 @@
# Dont touch this number please # Dont touch this number please
config-version: 11 config-version: 12
# The time the server will wait between sending people in the queue # The time the server will wait between sending people in the queue
# Default: 5 # Default: 5
@@ -88,3 +88,10 @@ server-aliases:
# In seconds # In seconds
# Default: 1 # Default: 1
wait-after-online: 1 wait-after-online: 1
# This is for helping with finding issues with the server pinged
# This will spam the console when ehabled
# When this enabled, if servers are offline then it will spam errors. You can ignore them.
# Default: false
pinger-debug: false