aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0064-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch
blob: 402e8a74af853bc4c79a30b35453a483d74696f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From 4f03ec9512277188129246d8315d1cbc42f3ad9b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 3 Mar 2016 02:21:58 -0600
Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 47851c1..08edd53 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1314,6 +1314,18 @@ public final class CraftServer implements Server {
         return count;
     }
 
+    // Paper start
+    @Override
+    public void broadcast(BaseComponent component) {
+        this.spigot.broadcast(component);
+    }
+
+    @Override
+    public void broadcast(BaseComponent... components) {
+        this.spigot.broadcast(components);
+    }
+    // Paper end
+
     @Override
     @Deprecated
     public OfflinePlayer getOfflinePlayer(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9770c99..bd1b74c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -156,6 +156,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         }
     }
 
+    // Paper start
+    @Override
+    public void sendMessage(BaseComponent component) {
+        this.spigot.sendMessage(component);
+    }
+
+    @Override
+    public void sendMessage(BaseComponent... components) {
+        this.spigot.sendMessage(components);
+    }
+
+    @Override
+    public void sendMessage(net.md_5.bungee.api.ChatMessageType position, BaseComponent... components) {
+        this.spigot.sendMessage(position, components);
+    }
+    // Paper end
+
     @Override
     public String getDisplayName() {
         return getHandle().displayName;
-- 
2.8.2