geforkt von Mirrors/Velocity
Fixed disconnection reason display due to outdated client version (#1259)
Dieser Commit ist enthalten in:
Ursprung
d330236b09
Commit
af09677f60
@ -118,6 +118,8 @@ public class HandshakeSessionHandler implements MinecraftSessionHandler {
|
|||||||
|
|
||||||
private void handleLogin(HandshakePacket handshake, InitialInboundConnection ic) {
|
private void handleLogin(HandshakePacket handshake, InitialInboundConnection ic) {
|
||||||
if (!ProtocolVersion.isSupported(handshake.getProtocolVersion())) {
|
if (!ProtocolVersion.isSupported(handshake.getProtocolVersion())) {
|
||||||
|
// Bump connection into correct protocol state so that we can send the disconnect packet.
|
||||||
|
connection.setState(StateRegistry.LOGIN);
|
||||||
ic.disconnectQuietly(Component.translatable()
|
ic.disconnectQuietly(Component.translatable()
|
||||||
.key("multiplayer.disconnect.outdated_client")
|
.key("multiplayer.disconnect.outdated_client")
|
||||||
.arguments(Component.text(ProtocolVersion.SUPPORTED_VERSION_STRING))
|
.arguments(Component.text(ProtocolVersion.SUPPORTED_VERSION_STRING))
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren