3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Don't crash when attempt servers order is empty, return empty optional instead (#576)

Dieser Commit ist enthalten in:
sagan 2021-09-15 05:42:14 -06:00 committet von GitHub
Ursprung d1135bd190
Commit ea07c6661a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -690,7 +690,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
} }
if (serversToTry.isEmpty()) { 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++) { for (int i = tryIndex; i < serversToTry.size(); i++) {