Skip to content

Commit

Permalink
Use real vanilla limits for LegacyChat (PaperMC#1502)
Browse files Browse the repository at this point in the history
Client -> server
< 1.11 has 100
>= 1.11 has 256

Server -> client has always 262144
  • Loading branch information
Outfluencer authored Jan 31, 2025
1 parent 0e84b57 commit 91bdceb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public String toString() {

@Override
public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {
message = ProtocolUtils.readString(buf, 256);
message = ProtocolUtils.readString(buf, direction == ProtocolUtils.Direction.CLIENTBOUND
? 262144 : version.noLessThan(ProtocolVersion.MINECRAFT_1_11) ? 256 : 100);
if (direction == ProtocolUtils.Direction.CLIENTBOUND
&& version.noLessThan(ProtocolVersion.MINECRAFT_1_8)) {
type = buf.readByte();
Expand Down

0 comments on commit 91bdceb

Please sign in to comment.