mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
e4d10a6d67
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
36 lines
1.9 KiB
Diff
36 lines
1.9 KiB
Diff
From 79a52da2e13be31fd550ffd6b4a585acda7111e7 Mon Sep 17 00:00:00 2001
|
|
From: kashike <kashike@vq.lc>
|
|
Date: Wed, 20 Mar 2019 21:19:29 -0700
|
|
Subject: [PATCH] Use proper max length when serialising BungeeCord text
|
|
component
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
|
|
index 0ab611564e..f7b2095bb7 100644
|
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java
|
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
|
|
@@ -3,7 +3,7 @@ package net.minecraft.server;
|
|
import java.io.IOException;
|
|
|
|
public class PacketPlayOutChat implements Packet<PacketListenerPlayOut> {
|
|
-
|
|
+ private static final int MAX_LENGTH = Short.MAX_VALUE * 8 + 8; // Paper
|
|
private IChatBaseComponent a;
|
|
public net.md_5.bungee.api.chat.BaseComponent[] components; // Spigot
|
|
private ChatMessageType b;
|
|
@@ -32,9 +32,9 @@ public class PacketPlayOutChat implements Packet<PacketListenerPlayOut> {
|
|
//packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(components)); // Paper - comment, replaced with below
|
|
// Paper start - don't nest if we don't need to so that we can preserve formatting
|
|
if (this.components.length == 1) {
|
|
- packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.components[0]));
|
|
+ packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.components[0]), MAX_LENGTH); // Paper - use proper max length
|
|
} else {
|
|
- packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.components));
|
|
+ packetdataserializer.a(net.md_5.bungee.chat.ComponentSerializer.toString(this.components), MAX_LENGTH); // Paper - use proper max length
|
|
}
|
|
// Paper end
|
|
} else {
|
|
--
|
|
2.25.1
|
|
|