Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2025-01-12 08:01:13 +01:00
Fix SystemChatPacket: Support reading packet properly in newer MC versions (#1461)
Dieser Commit ist enthalten in:
Ursprung
cefa3b272e
Commit
9cfcfcf2ed
@ -47,8 +47,11 @@ public class SystemChatPacket implements MinecraftPacket {
|
|||||||
@Override
|
@Override
|
||||||
public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {
|
public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {
|
||||||
component = ComponentHolder.read(buf, version);
|
component = ComponentHolder.read(buf, version);
|
||||||
// System chat is never decoded so this doesn't matter for now
|
if (version.noLessThan(ProtocolVersion.MINECRAFT_1_19_1)){
|
||||||
type = ChatType.values()[ProtocolUtils.readVarInt(buf)];
|
type = buf.readBoolean() ? ChatType.GAME_INFO : ChatType.SYSTEM;
|
||||||
|
} else {
|
||||||
|
type = ChatType.values()[ProtocolUtils.readVarInt(buf)];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren