geforkt von Mirrors/Paper
0708fa363b
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 CraftBukkit Changes:eb2e6578
SPIGOT-5116: Fix concurrent modification exception inside ChunkMapDistance989f9b3d
SPIGOT-4849: Fix server crash when accessing chunks during chunk load/unload/populate eventsf554183c
SPIGOT-5171: Don't fire PlayerTeleportEvent if not actually moving2349feb8
SPIGOT-5163: Cancelling PlayerBucketFillEvent visually removes the targeted block Spigot Changes: 9a643a6a Remove DataWatcher Locking
36 Zeilen
1.8 KiB
Diff
36 Zeilen
1.8 KiB
Diff
From a4e1cd2248a90f088ce52c2b64dea62ff22268c3 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 0ab611564..f7b2095bb 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.22.0
|
|
|