From 29369fb085ed18ea71a0b2fbc6971ff41cb7d6e2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 20 Dec 2016 15:56:41 -0500 Subject: [PATCH] Add String based Action Bar API --- ...0045-Add-String-based-Action-Bar-API.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Spigot-API-Patches/0045-Add-String-based-Action-Bar-API.patch diff --git a/Spigot-API-Patches/0045-Add-String-based-Action-Bar-API.patch b/Spigot-API-Patches/0045-Add-String-based-Action-Bar-API.patch new file mode 100644 index 0000000000..f4d831ebfa --- /dev/null +++ b/Spigot-API-Patches/0045-Add-String-based-Action-Bar-API.patch @@ -0,0 +1,26 @@ +From 83de0f53b126c9e390f06f8ceaa82ac4f7795c90 Mon Sep 17 00:00:00 2001 +From: Aikar +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 bf4c31ba..a4e64535 100644 +--- a/src/main/java/org/bukkit/entity/Player.java ++++ b/src/main/java/org/bukkit/entity/Player.java +@@ -392,6 +392,12 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline + public void sendMap(MapView map); + + // Paper start ++ public default void sendActionBar(String message) { ++ sendMessage(net.md_5.bungee.api.chat.TextComponent.fromLegacyText(message)); ++ } ++ public default void sendActionBar(char alternateChar, String message) { ++ sendMessage(net.md_5.bungee.api.chat.TextComponent.fromLegacyText(org.bukkit.ChatColor.translateAlternateColorCodes(alternateChar, message))); ++ } + /** + * Sends the component to the player + * +-- +2.11.0 +