Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-06 00:00:47 +01:00
Merge pull request #45 from phase/feature/fallback-server
Fallback to next server on connection error
Dieser Commit ist enthalten in:
Commit
16f9514972
@ -177,7 +177,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
if (connectedServer == null || connectedServer.getServerInfo().equals(info)) {
|
if (connectedServer == null || connectedServer.getServerInfo().equals(info)) {
|
||||||
// The player isn't yet connected to a server or they are already connected to the server
|
// The player isn't yet connected to a server or they are already connected to the server
|
||||||
// they're disconnected from.
|
// they're disconnected from.
|
||||||
connection.closeWith(Disconnect.create(disconnectReason));
|
Optional<ServerInfo> nextServer = getNextServerToTry();
|
||||||
|
if (nextServer.isPresent()) {
|
||||||
|
createConnectionRequest(nextServer.get()).fireAndForget();
|
||||||
|
} else {
|
||||||
|
connection.closeWith(Disconnect.create(disconnectReason));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
connection.write(Chat.create(disconnectReason));
|
connection.write(Chat.create(disconnectReason));
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren