3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

Fix try list giving up after the first server.

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-08-22 13:36:34 -04:00
Ursprung 1f621300f6
Commit 154b50992c

Datei anzeigen

@ -576,6 +576,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
}
private void handleKickEvent(KickedFromServerEvent originalEvent, Component friendlyReason) {
boolean connectedToServer = connectedServer != null;
server.getEventManager().fire(originalEvent)
.thenAcceptAsync(event -> {
// There can't be any connection in flight now.
@ -594,9 +595,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
createConnectionRequest(res.getServer())
.connectWithIndication()
.whenCompleteAsync((newResult, exception) -> {
if (newResult == null || !newResult) {
disconnect(friendlyReason);
} else {
if (newResult != null && newResult && connectedToServer) {
if (res.getMessageComponent() == null) {
sendMessage(server.getConfiguration().getMessages()
.getMovedToNewServerPrefix().append(friendlyReason));