geforkt von Mirrors/Paper
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
63 Zeilen
2.5 KiB
Diff
63 Zeilen
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Tue, 20 Dec 2016 15:55:55 -0500
|
|
Subject: [PATCH] Add String based Action Bar API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index b23e53ff71b50fcbadcb6c4e537a3e8f2164a692..ef8980a8a0f24f31d1e8e2cd80dcc2785e739896 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -873,6 +873,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
public void sendMap(@NotNull MapView map);
|
|
|
|
// Paper start
|
|
+
|
|
+ /**
|
|
+ * Sends an Action Bar message to the client.
|
|
+ *
|
|
+ * Use Section symbols for legacy color codes to send formatting.
|
|
+ *
|
|
+ * @param message The message to send
|
|
+ * @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
|
|
+ */
|
|
+ @Deprecated
|
|
+ public void sendActionBar(@NotNull String message);
|
|
+
|
|
+ /**
|
|
+ * Sends an Action Bar message to the client.
|
|
+ *
|
|
+ * Use supplied alternative character to the section symbol to represent legacy color codes.
|
|
+ *
|
|
+ * @param alternateChar Alternate symbol such as '&'
|
|
+ * @param message The message to send
|
|
+ * @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
|
|
+ */
|
|
+ @Deprecated
|
|
+ public void sendActionBar(char alternateChar, @NotNull String message);
|
|
+
|
|
+ /**
|
|
+ * Sends an Action Bar message to the client.
|
|
+ *
|
|
+ * @param message The components to send
|
|
+ * @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
|
|
+ */
|
|
+ @Deprecated
|
|
+ public void sendActionBar(@NotNull net.md_5.bungee.api.chat.BaseComponent... message);
|
|
+
|
|
/**
|
|
* Sends the component to the player
|
|
*
|
|
@@ -900,9 +933,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
/**
|
|
* Sends an array of components as a single message to the specified screen position of this player
|
|
*
|
|
+ * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
|
|
* @param position the screen position
|
|
* @param components the components to send
|
|
*/
|
|
+ @Deprecated
|
|
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
|
|
spigot().sendMessage(position, components);
|
|
}
|