mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 10:06:11 +03:00
27 lines
871 B
Diff
27 lines
871 B
Diff
--- ../src-base/minecraft/net/minecraft/network/play/server/SPacketChat.java
|
|
+++ ../src-work/minecraft/net/minecraft/network/play/server/SPacketChat.java
|
|
@@ -11,6 +11,8 @@
|
|
public class SPacketChat implements Packet<INetHandlerPlayClient>
|
|
{
|
|
private ITextComponent chatComponent;
|
|
+ public net.md_5.bungee.api.chat.BaseComponent[] components; // Spigot
|
|
+
|
|
private byte type;
|
|
|
|
public SPacketChat()
|
|
@@ -36,7 +38,13 @@
|
|
|
|
public void writePacketData(PacketBuffer buf) throws IOException
|
|
{
|
|
- buf.writeTextComponent(this.chatComponent);
|
|
+ // Spigot start
|
|
+ if (components != null) {
|
|
+ buf.writeString(net.md_5.bungee.chat.ComponentSerializer.toString(components));
|
|
+ } else {
|
|
+ buf.writeTextComponent(this.chatComponent);
|
|
+ }
|
|
+ // Spigot end
|
|
buf.writeByte(this.type);
|
|
}
|
|
|