diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java index 24d203b13..6006bfc36 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java @@ -370,18 +370,8 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { GsonComponentSerializer serializer = ProtocolUtils.getJsonChatSerializer(this .getProtocolVersion()); - GenericTitlePacket titlePkt = GenericTitlePacket.constructTitlePacket( - GenericTitlePacket.ActionType.SET_TITLE, this.getProtocolVersion()); - titlePkt.setComponent(serializer.serialize(translateMessage(title.title()))); - connection.delayedWrite(titlePkt); - - GenericTitlePacket subtitlePkt = GenericTitlePacket.constructTitlePacket( - GenericTitlePacket.ActionType.SET_SUBTITLE, this.getProtocolVersion()); - subtitlePkt.setComponent(serializer.serialize(translateMessage(title.subtitle()))); - connection.delayedWrite(subtitlePkt); - GenericTitlePacket timesPkt = GenericTitlePacket.constructTitlePacket( - GenericTitlePacket.ActionType.SET_TIMES, this.getProtocolVersion()); + GenericTitlePacket.ActionType.SET_TIMES, this.getProtocolVersion()); net.kyori.adventure.title.Title.Times times = title.times(); if (times != null) { timesPkt.setFadeIn((int) DurationUtils.toTicks(times.fadeIn())); @@ -390,6 +380,16 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { } connection.delayedWrite(timesPkt); + GenericTitlePacket subtitlePkt = GenericTitlePacket.constructTitlePacket( + GenericTitlePacket.ActionType.SET_SUBTITLE, this.getProtocolVersion()); + subtitlePkt.setComponent(serializer.serialize(translateMessage(title.subtitle()))); + connection.delayedWrite(subtitlePkt); + + GenericTitlePacket titlePkt = GenericTitlePacket.constructTitlePacket( + GenericTitlePacket.ActionType.SET_TITLE, this.getProtocolVersion()); + titlePkt.setComponent(serializer.serialize(translateMessage(title.title()))); + connection.delayedWrite(titlePkt); + connection.flush(); } }