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;
|
maxPlayers = 0;
|
||||||
for(AdaptedServer pingedServer : pings.keySet()) {
|
for(AdaptedServer pingedServer : pings.keySet()) {
|
||||||
AdaptedServerPing serverPing = pings.get(pingedServer);
|
AdaptedServerPing serverPing = pings.get(pingedServer);
|
||||||
if(serverPing == null) {
|
if(serverPing == null || serverPing.getPlainDescription() == null) {
|
||||||
|
if(serverPing != null) {
|
||||||
|
pings.put(pingedServer, null);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(serverPing.getPlainDescription().contains("ajQueue;whitelisted=")) {
|
if(serverPing.getPlainDescription().contains("ajQueue;whitelisted=")) {
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ public class BungeeServerPing implements AdaptedServerPing {
|
|||||||
@Override
|
@Override
|
||||||
public String getPlainDescription() {
|
public String getPlainDescription() {
|
||||||
BaseComponent desc = handle.getDescriptionComponent();
|
BaseComponent desc = handle.getDescriptionComponent();
|
||||||
if(desc == null) return "";
|
if(desc == null) return null;
|
||||||
return desc.toPlainText();
|
return desc.toPlainText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user