Skip to content

Commit 8c8d4f6

Browse files
committed
chore: Correct wrong typ for write defaults.
1 parent a9307f3 commit 8c8d4f6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main/java/me/catcoder/sidebar/protocol/ScoreboardPackets.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,13 @@ public <R> ByteBuf createTeamPacket(int mode, int index,
206206

207207
private static void writeDefaults(int serverVersion, @NonNull NetOutput packet) {
208208
packet.writeByte(10); // friendly tags
209-
packet.writeString("always"); // name tag visibility
210-
packet.writeString("always"); // collision rule
209+
if (serverVersion <= ProtocolConstants.MINECRAFT_1_21_4) {
210+
packet.writeString("always"); // name tag visibility
211+
packet.writeString("always"); // collision rule
212+
} else {
213+
packet.writeVarInt(0); // name tag visibility
214+
packet.writeVarInt(0); // collision rule
215+
}
211216
if (serverVersion < ProtocolConstants.MINECRAFT_1_13) {
212217
packet.writeByte(-1); // reset color
213218
} else {

0 commit comments

Comments
 (0)