make sure server ping is null if the server isnt online
This commit is contained in:
@@ -160,7 +160,10 @@ public class QueueServerImpl implements QueueServer {
|
||||
maxPlayers = 0;
|
||||
for(AdaptedServer pingedServer : pings.keySet()) {
|
||||
AdaptedServerPing serverPing = pings.get(pingedServer);
|
||||
if(serverPing == null) {
|
||||
if(serverPing == null || serverPing.getPlainDescription() == null) {
|
||||
if(serverPing != null) {
|
||||
pings.put(pingedServer, null);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if(serverPing.getPlainDescription().contains("ajQueue;whitelisted=")) {
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public class BungeeServerPing implements AdaptedServerPing {
|
||||
@Override
|
||||
public String getPlainDescription() {
|
||||
BaseComponent desc = handle.getDescriptionComponent();
|
||||
if(desc == null) return "";
|
||||
if(desc == null) return null;
|
||||
return desc.toPlainText();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user