geforkt von Mirrors/Paper
73983e4c16
Upstream has released updates that appears 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: 3dc4cdcd Update to Minecraft 1.14.3-pre4 88b25a8c SPIGOT-5098: Add a method to allow colored sign changes 6d913552 Update to Minecraft 1.14.3-pre4 CraftBukkit Changes:f1f33559
Update to Minecraft 1.14.38a3d3f49
SPIGOT-5098: Add a method to allow colored sign changes533290e2
SPIGOT-5100: Console warning from pig zombie targeting6dde4b9f
SPIGOT-5094: Allow opening merchant for wandering traders and hide the xp bar for custom merchants9af90077
SPIGOT-5097: Bukkit.clearRecipes() no longer working38fa220f
Fix setting game rules via the APIfe3930ce
Update to Minecraft 1.14.3-pre4da071ec5
Remove outdated build delay. Spigot Changes: 4d2f30f1 Update to Minecraft 1.14.3 f16400e3 Update to Minecraft 1.14.3-pre4
77 Zeilen
3.5 KiB
Diff
77 Zeilen
3.5 KiB
Diff
From 1e1122199e63c367ef06b4dc4dd05ab81197f123 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 aaa74125..f41545c5 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -446,6 +446,26 @@ 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
|
|
+ */
|
|
+ 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
|
|
+ */
|
|
+ public void sendActionBar(char alternateChar, @NotNull String message);
|
|
+
|
|
/**
|
|
* Sends the component to the player
|
|
*
|
|
@@ -469,9 +489,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);
|
|
}
|
|
@@ -1817,9 +1839,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
/**
|
|
* Sends the component 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 component the components to send
|
|
*/
|
|
+ @Deprecated
|
|
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
|
throw new UnsupportedOperationException("Not supported yet.");
|
|
}
|
|
@@ -1827,9 +1851,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 void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
|
throw new UnsupportedOperationException("Not supported yet.");
|
|
}
|
|
--
|
|
2.22.0
|
|
|