added send-fail-debug option

This commit is contained in:
ajgeiss0702
2020-10-17 09:06:26 -07:00
parent 6dd37a309c
commit a9f2c302bd
4 changed files with 33 additions and 2 deletions
+5 -1
View File
@@ -220,9 +220,13 @@ public class Main extends Plugin implements Listener {
} }
if(hasReason) break; if(hasReason) break;
} }
if(!hasReason) continue; if(hasReason) {
server.getQueue().remove(p); server.getQueue().remove(p);
} }
if(config.getBoolean("send-fail-debug")) {
getLogger().warning("Failed to send "+p.getName()+" to "+e.getKickedFrom().getName()+" because "+e.getKickReasonComponent().toString());
}
}
} }
@@ -549,6 +549,25 @@ public class Manager {
if(!s.canAccess(nextplayer)) continue; if(!s.canAccess(nextplayer)) continue;
/*if(nextplayer == null) {
pl.getLogger().info("nextplayer is null");
}
if(nextplayer.getServer() == null) {
pl.getLogger().info("getServer is null");
}
if(nextplayer.getServer().getInfo() == null) {
pl.getLogger().info("getInfo is null");
}
if(nextplayer.getServer().getInfo().getName() == null) {
pl.getLogger().info("getName is null");
}
if(s == null) {
pl.getLogger().info("s is null");
}
if(s.getName() == null) {
pl.getLogger().info("s.getName() is null");
}*/
while(nextplayer.getServer().getInfo().getName().equals(s.getName())) { while(nextplayer.getServer().getInfo().getName().equals(s.getName())) {
s.getQueue().remove(nextplayer); s.getQueue().remove(nextplayer);
@@ -53,6 +53,9 @@ public class QueueServer {
public void update() { public void update() {
pings = new HashMap<>(); pings = new HashMap<>();
for(final ServerInfo info : getInfos()) { for(final ServerInfo info : getInfos()) {
if(Main.plugin.getConfig().getBoolean("pinger-debug")) {
Main.plugin.getLogger().info("[pinger] ["+info.getName()+"] sending ping");
}
info.ping(new Callback<ServerPing>() { info.ping(new Callback<ServerPing>() {
@Override @Override
public void done(ServerPing result, Throwable error) { public void done(ServerPing result, Throwable error) {
+5
View File
@@ -132,3 +132,8 @@ tab-complete-queues: true
send-instantly: send-instantly:
- "lobbys" - "lobbys"
# Should we log to the bungeecord console when a player fails to get sent to a server from the queue?
# Enable this if you are having an issue with one player stopping the queue
# Default: false
send-fail-debug: false