3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00
Paper/patches/removed/1.17/0051-Player-Tab-List-and-Title-APIs.patch
2021-06-12 03:19:04 +02:00

31 Zeilen
1.5 KiB
Diff

diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
index 69ff8df7340e60c476803256750a48f0b43414d3..df444daeb181ff78170f7b92bd02f1f1862dfa2e 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitlesPacket.java
@@ -47,6 +47,17 @@ public class ClientboundSetTitlesPacket implements Packet<ClientGamePacketListen
}
}
+ // Paper start
+ public net.md_5.bungee.api.chat.BaseComponent[] components;
+
+ public ClientboundSetTitlesPacket(Type action, net.md_5.bungee.api.chat.BaseComponent[] components, int fadeIn, int stay, int fadeOut) {
+ this.type = action;
+ this.components = components;
+ this.fadeInTime = fadeIn;
+ this.stayTime = stay;
+ this.fadeOutTime = fadeOut;
+ }
+ // Paper end
@Override
public void write(FriendlyByteBuf buf) throws IOException {
@@ -55,6 +66,8 @@ public class ClientboundSetTitlesPacket implements Packet<ClientGamePacketListen
// Paper start
if (this.adventure$text != null) {
buf.writeComponent(this.adventure$text);
+ } else if (this.components != null) {
+ buf.writeComponent(this.components);
} else
// Paper end
buf.writeComponent(this.text);