From b154b7f9418e833c52a80542fe6c4300eb902800 Mon Sep 17 00:00:00 2001 From: Riley Park Date: Mon, 8 Mar 2021 12:36:03 -0800 Subject: [PATCH] Fix title swapping fadeIn and stay --- Spigot-Server-Patches/Adventure.patch | 4 ++-- Spigot-Server-Patches/Broadcast-join-message-to-console.patch | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/Adventure.patch b/Spigot-Server-Patches/Adventure.patch index 194d30548c..cb9431f2a8 100644 --- a/Spigot-Server-Patches/Adventure.patch +++ b/Spigot-Server-Patches/Adventure.patch @@ -1445,7 +1445,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - server.getPlayerList().sendAll(new PacketPlayOutChat(line, ChatMessageType.SYSTEM, SystemUtils.b)); - } + if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure -+ joinMessage = PaperAdventure.asVanilla(playerJoinEvent.joinMessage()); // Paper - Adventure ++ joinMessage = PaperAdventure.asVanilla(jm); // Paper - Adventure + server.getPlayerList().sendAll(new PacketPlayOutChat(joinMessage, ChatMessageType.SYSTEM, SystemUtils.b)); // Paper - Adventure } // CraftBukkit end @@ -2225,7 +2225,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + final PlayerConnection connection = this.getHandle().playerConnection; + final net.kyori.adventure.title.Title.Times times = title.times(); + if (times != null) { -+ connection.sendPacket(new PacketPlayOutTitle(ticks(times.fadeIn()), ticks(times.fadeOut()), ticks(times.stay()))); ++ connection.sendPacket(new PacketPlayOutTitle(ticks(times.fadeIn()), ticks(times.stay()), ticks(times.fadeOut()))); + } + final PacketPlayOutTitle sp = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.SUBTITLE, null); + sp.adventure$text = title.subtitle(); diff --git a/Spigot-Server-Patches/Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/Broadcast-join-message-to-console.patch index a04609f4fc..9a63a0945a 100644 --- a/Spigot-Server-Patches/Broadcast-join-message-to-console.patch +++ b/Spigot-Server-Patches/Broadcast-join-message-to-console.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class PlayerList { if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure - joinMessage = PaperAdventure.asVanilla(playerJoinEvent.joinMessage()); // Paper - Adventure + joinMessage = PaperAdventure.asVanilla(jm); // Paper - Adventure - server.getPlayerList().sendAll(new PacketPlayOutChat(joinMessage, ChatMessageType.SYSTEM, SystemUtils.b)); // Paper - Adventure + // Paper start - Removed sendAll for loop and broadcasted to console also + server.getPlayerList().sendMessage(joinMessage); // Paper - Adventure