possible fix for nextplayer nullpointer

This commit is contained in:
ajgeiss0702
2020-10-03 16:38:23 -07:00
parent 08aa302b4e
commit 038f2e4559
@@ -539,9 +539,17 @@ public class Manager {
} }
ProxiedPlayer nextplayer = s.getQueue().get(0); ProxiedPlayer nextplayer = s.getQueue().get(0);
if(nextplayer == null) {
if(s.getQueue().size() > 0) {
s.getQueue().remove(0);
}
continue;
}
if(!s.canAccess(nextplayer)) continue; if(!s.canAccess(nextplayer)) continue;
while(nextplayer.getServer().getInfo().getName().equals(s.getName())) { while(nextplayer.getServer().getInfo().getName().equals(s.getName())) {
s.getQueue().remove(nextplayer); s.getQueue().remove(nextplayer);
if(s.getQueue().size() <= 0) break; if(s.getQueue().size() <= 0) break;