diff --git a/Spigot-Server-Patches/0554-Brand-support.patch b/Spigot-Server-Patches/0554-Brand-support.patch index a340ec4c8..5fd277c70 100644 --- a/Spigot-Server-Patches/0554-Brand-support.patch +++ b/Spigot-Server-Patches/0554-Brand-support.patch @@ -40,8 +40,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 packetplayincustompayload.data.readBytes(data); + + // Paper start - Brand support -+ if (packetplayincustompayload.tag.equals(MINECRAFT_BRAND)) -+ this.clientBrandName = new PacketDataSerializer(Unpooled.copiedBuffer(data)).readUTF(256); ++ if (packetplayincustompayload.tag.equals(MINECRAFT_BRAND)) { ++ this.clientBrandName = data.length < 512 ? new String(data) : "unknown-too-large"; ++ } + // Paper end server.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), packetplayincustompayload.tag.toString(), data); } catch (Exception ex) {