Don't crash when attempt servers order is empty, return empty optional instead (#576)
This commit is contained in:
@@ -690,7 +690,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
}
|
||||
|
||||
if (serversToTry.isEmpty()) {
|
||||
serversToTry = server.getConfiguration().getAttemptConnectionOrder();
|
||||
List<String> connOrder = server.getConfiguration().getAttemptConnectionOrder();
|
||||
if (connOrder.isEmpty()) {
|
||||
return Optional.empty();
|
||||
} else {
|
||||
serversToTry = connOrder;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = tryIndex; i < serversToTry.size(); i++) {
|
||||
|
Reference in New Issue
Block a user