mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-11 10:01:55 +01:00
Update bungeecord chat API graduations
This commit is contained in:
parent
e3e56baeea
commit
567224a84c
@ -84,6 +84,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ * @param components the components to send
|
+ * @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.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
|
+ // Paper end
|
||||||
+
|
+
|
||||||
/**
|
/**
|
||||||
|
@ -383,7 +383,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||||
* @param components the components to send
|
* @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
|
+ * Set the text displayed in the player list header and footer for this player
|
||||||
|
@ -15,16 +15,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void broadcast(BaseComponent component) {
|
+ public void broadcast(BaseComponent component) {
|
||||||
+ for (Player player : getOnlinePlayers()) {
|
+ this.spigot.broadcast(component);
|
||||||
+ player.sendMessage(component);
|
|
||||||
+ }
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void broadcast(BaseComponent... components) {
|
+ public void broadcast(BaseComponent... components) {
|
||||||
+ for (Player player : getOnlinePlayers()) {
|
+ this.spigot.broadcast(components);
|
||||||
+ player.sendMessage(components);
|
|
||||||
+ }
|
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
@ -42,16 +38,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void sendMessage(BaseComponent component) {
|
+ public void sendMessage(BaseComponent component) {
|
||||||
+ sendMessage(new BaseComponent[]{component});
|
+ this.spigot.sendMessage(component);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void sendMessage(BaseComponent... components) {
|
+ public void sendMessage(BaseComponent... components) {
|
||||||
+ if (getHandle().playerConnection == null) return;
|
+ this.spigot.sendMessage(components);
|
||||||
|
+ }
|
||||||
+
|
+
|
||||||
+ PacketPlayOutChat packet = new PacketPlayOutChat();
|
+ @Override
|
||||||
+ packet.components = components;
|
+ public void sendMessage(net.md_5.bungee.api.ChatMessageType position, BaseComponent... components) {
|
||||||
+ getHandle().playerConnection.sendPacket(packet);
|
+ this.spigot.sendMessage(position, components);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
|
@ -89,8 +89,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
packet.components = components;
|
public void sendMessage(net.md_5.bungee.api.ChatMessageType position, BaseComponent... components) {
|
||||||
getHandle().playerConnection.sendPacket(packet);
|
this.spigot.sendMessage(position, components);
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
Loading…
Reference in New Issue
Block a user