diff --git a/src/main/java/us/ajg0702/queue/Main.java b/src/main/java/us/ajg0702/queue/Main.java index 7cbc9d9..0dbb57b 100644 --- a/src/main/java/us/ajg0702/queue/Main.java +++ b/src/main/java/us/ajg0702/queue/Main.java @@ -220,8 +220,12 @@ public class Main extends Plugin implements Listener { } if(hasReason) break; } - if(!hasReason) continue; - server.getQueue().remove(p); + if(hasReason) { + 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()); + } } } diff --git a/src/main/java/us/ajg0702/queue/Manager.java b/src/main/java/us/ajg0702/queue/Manager.java index 3a812f5..273b041 100644 --- a/src/main/java/us/ajg0702/queue/Manager.java +++ b/src/main/java/us/ajg0702/queue/Manager.java @@ -549,6 +549,25 @@ public class Manager { 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())) { s.getQueue().remove(nextplayer); diff --git a/src/main/java/us/ajg0702/queue/QueueServer.java b/src/main/java/us/ajg0702/queue/QueueServer.java index b11030e..3433377 100644 --- a/src/main/java/us/ajg0702/queue/QueueServer.java +++ b/src/main/java/us/ajg0702/queue/QueueServer.java @@ -53,6 +53,9 @@ public class QueueServer { public void update() { pings = new HashMap<>(); 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() { @Override public void done(ServerPing result, Throwable error) { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index bcfa34d..3134164 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -132,3 +132,8 @@ tab-complete-queues: true send-instantly: - "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 +