diff --git a/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index 94d0cfa4ab..8adb2b09d4 100644 --- a/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-API-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -84,6 +84,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param components the components to send + */ + public void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components); ++ ++ /** ++ * Sends an array of components as a single message to the specified screen position of this player ++ * ++ * @param position the screen position ++ * @param components the components to send ++ */ ++ public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components); + // Paper end + /** diff --git a/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch b/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch index 56d0ac7b6b..b3eb81ef87 100644 --- a/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-API-Patches/Player-Tab-List-and-Title-APIs.patch @@ -383,7 +383,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param components the components to send */ - public void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components); + public void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components); + + /** + * Set the text displayed in the player list header and footer for this player diff --git a/Spigot-Server-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-Server-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index 7338c62485..1b584c2972 100644 --- a/Spigot-Server-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-Server-Patches/Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -15,16 +15,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + @Override + public void broadcast(BaseComponent component) { -+ for (Player player : getOnlinePlayers()) { -+ player.sendMessage(component); -+ } ++ this.spigot.broadcast(component); + } + + @Override + public void broadcast(BaseComponent... components) { -+ for (Player player : getOnlinePlayers()) { -+ player.sendMessage(components); -+ } ++ this.spigot.broadcast(components); + } + // Paper end + @@ -42,16 +38,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + @Override + public void sendMessage(BaseComponent component) { -+ sendMessage(new BaseComponent[]{component}); ++ this.spigot.sendMessage(component); + } + + @Override + public void sendMessage(BaseComponent... components) { -+ if (getHandle().playerConnection == null) return; ++ this.spigot.sendMessage(components); ++ } + -+ PacketPlayOutChat packet = new PacketPlayOutChat(); -+ packet.components = components; -+ getHandle().playerConnection.sendPacket(packet); ++ @Override ++ public void sendMessage(net.md_5.bungee.api.ChatMessageType position, BaseComponent... components) { ++ this.spigot.sendMessage(position, components); + } + // Paper end + diff --git a/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch index 5eda2c4371..8229a6d145 100644 --- a/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/Player-Tab-List-and-Title-APIs.patch @@ -89,8 +89,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 import com.google.common.collect.ImmutableSet; import com.mojang.authlib.GameProfile; @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { - packet.components = components; - getHandle().playerConnection.sendPacket(packet); + public void sendMessage(net.md_5.bungee.api.ChatMessageType position, BaseComponent... components) { + this.spigot.sendMessage(position, components); } + + @Override