13
0
geforkt von Mirrors/Velocity

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