Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
4af62f6d1d
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 2d009e64 Update SnakeYAML javadoc link b4fd213c Switch Player#updateInventory deprecation for internal API annotation CraftBukkit Changes: f3b2b2210 SPIGOT-7376: Exception with getBlockData when hasBlockData is false 725545630 SPIGOT-7375: Fix crash breeding certain entities b9873b0d4 Update Brigadier version with fix 68b320562 SPIGOT-7266: Found typo in CraftBukkit package 98b4d2ff8 SPIGOT-7372, SPIGOT-7373: Signs can't be edited, issues with SignChangeEvent 5f7bd4d78 SPIGOT-7371: Sign does not open edit text on placement b4cf99d24 SPIGOT-7371: Fix editing signs with API a2b6c2744 PR-1200: Implement open sign by side a345bb940 SPIGOT-7368: Downgrade SpecialSource version Spigot Changes: 723951c3 Rebuild patches b655c57d Drop old collision API deprecated since 1.9.4 55b0fed4 Rebuild patches
125 Zeilen
5.0 KiB
Diff
125 Zeilen
5.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
|
Date: Mon, 29 Feb 2016 19:54:32 -0600
|
|
Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
|
|
|
|
Change Javadoc to be accurate
|
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
|
index b28d196a810e121d0502e0035b16d2c6ed2efe2d..61734532c341dcbc0565189b63fd05f53b041039 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -400,6 +400,30 @@ public final class Bukkit {
|
|
return server.broadcastMessage(message);
|
|
}
|
|
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Sends the component to all online players.
|
|
+ *
|
|
+ * @param component the component to send
|
|
+ * @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component}
|
|
+ */
|
|
+ @Deprecated
|
|
+ public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
|
+ server.broadcast(component);
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Sends an array of components as a single message to all online players.
|
|
+ *
|
|
+ * @param components the components to send
|
|
+ * @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component}
|
|
+ */
|
|
+ @Deprecated
|
|
+ public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
|
+ server.broadcast(components);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Gets the name of the update folder. The update folder is used to safely
|
|
* update plugins at the right moment on a plugin load.
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index b6ff3a80fcb5c0e843caa1cfdb165cf2cadb8bd2..f24bb5b22975bcbdce1bf1e80cf7a1b338ad12a5 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -337,6 +337,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
@Deprecated // Paper
|
|
public int broadcastMessage(@NotNull String message);
|
|
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Sends the component to all online players.
|
|
+ *
|
|
+ * @param component the component to send
|
|
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
|
|
+ */
|
|
+ @Deprecated
|
|
+ public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
|
+ spigot().broadcast(component);
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Sends an array of components as a single message to all online players.
|
|
+ *
|
|
+ * @param components the components to send
|
|
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
|
|
+ */
|
|
+ @Deprecated
|
|
+ public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
|
+ spigot().broadcast(components);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Gets the name of the update folder. The update folder is used to safely
|
|
* update plugins at the right moment on a plugin load.
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index 7be94e57dc2d665719e7dedfea790f0019a47310..67143a8ab7c18676054f5584dd2fd764a78c7836 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -872,6 +872,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
*/
|
|
public void sendMap(@NotNull MapView map);
|
|
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Sends the component to the player
|
|
+ *
|
|
+ * @param component the components to send
|
|
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
|
|
+ */
|
|
+ @Override
|
|
+ @Deprecated
|
|
+ public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
|
+ spigot().sendMessage(component);
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Sends an array of components as a single message to the player
|
|
+ *
|
|
+ * @param components the components to send
|
|
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
|
|
+ */
|
|
+ @Override
|
|
+ @Deprecated
|
|
+ public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
|
+ spigot().sendMessage(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 default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
|
|
+ spigot().sendMessage(position, components);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Send a hurt animation. This fakes incoming damage towards the player from
|
|
* the given yaw relative to the player's direction.
|