Skip to content

Commit

Permalink
Merge branch 'dev/3.0.0' of https://github.com/PaperMC/Velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 19, 2024
2 parents 33be16d + 9cfcfcf commit 04e97d5
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ public ComponentHolder getComponent() {
@Override
public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {
component = ComponentHolder.read(buf, version);
// System chat is never decoded so this doesn't matter for now
type = ChatType.values()[ProtocolUtils.readVarInt(buf)];
if (version.noLessThan(ProtocolVersion.MINECRAFT_1_19_1)){
type = buf.readBoolean() ? ChatType.GAME_INFO : ChatType.SYSTEM;
} else {
type = ChatType.values()[ProtocolUtils.readVarInt(buf)];
}
}

@Override
Expand Down

0 comments on commit 04e97d5

Please sign in to comment.