Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-08 17:20:20 +01:00
Improved the outdated version kick message (#394)
* Improved the outdated version kick message * Swapped 'server' to 'proxy'
Dieser Commit ist enthalten in:
Ursprung
aad4536990
Commit
daba0d6d5e
@ -46,8 +46,11 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(LoginPacket loginPacket) {
|
public boolean handle(LoginPacket loginPacket) {
|
||||||
if (loginPacket.getProtocolVersion() != GeyserConnector.BEDROCK_PACKET_CODEC.getProtocolVersion()) {
|
if (loginPacket.getProtocolVersion() > GeyserConnector.BEDROCK_PACKET_CODEC.getProtocolVersion()) {
|
||||||
session.getUpstream().disconnect("Unsupported Bedrock version. Are you running an outdated version?");
|
session.getUpstream().disconnect("Outdated Geyser proxy! I'm still on " + GeyserConnector.BEDROCK_PACKET_CODEC.getMinecraftVersion());
|
||||||
|
return true;
|
||||||
|
} else if (loginPacket.getProtocolVersion() < GeyserConnector.BEDROCK_PACKET_CODEC.getProtocolVersion()) {
|
||||||
|
session.getUpstream().disconnect("Outdated Bedrock client! Please use " + GeyserConnector.BEDROCK_PACKET_CODEC.getMinecraftVersion());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren