aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0119-String-based-Action-Bar-API.patch
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2024-07-17 10:24:53 -0700
committerSpottedleaf <[email protected]>2024-07-17 10:28:32 -0700
commit00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6 (patch)
tree82639515bc5e9ae00c1e639e72137ed51e1ac688 /patches/server/0119-String-based-Action-Bar-API.patch
parent967f98aa81da851740aeb429778e46159fd188df (diff)
downloadPaper-00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6.tar.gz
Paper-00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6.zip
Remove Moonrise utils to MCUtils, remove duplicated/unused utils
Diffstat (limited to 'patches/server/0119-String-based-Action-Bar-API.patch')
-rw-r--r--patches/server/0119-String-based-Action-Bar-API.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/patches/server/0119-String-based-Action-Bar-API.patch b/patches/server/0119-String-based-Action-Bar-API.patch
new file mode 100644
index 0000000000..b4a1ec6598
--- /dev/null
+++ b/patches/server/0119-String-based-Action-Bar-API.patch
@@ -0,0 +1,39 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+Date: Tue, 27 Dec 2016 15:02:42 -0500
+Subject: [PATCH] String based Action Bar API
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+index c399264ccffe646be10b3f13ebe0c0103d97f62c..d471e9370fdbcbce5357e52e8ea2a10c196cd33d 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+@@ -388,6 +388,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+ }
+
+ // Paper start
++ @Override
++ @Deprecated
++ public void sendActionBar(BaseComponent[] message) {
++ if (getHandle().connection == null) return;
++ net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket packet = new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket(org.bukkit.craftbukkit.util.CraftChatMessage.fromJSON(net.md_5.bungee.chat.ComponentSerializer.toString(message)));
++ getHandle().connection.send(packet);
++ }
++
++ @Override
++ @Deprecated
++ public void sendActionBar(String message) {
++ if (getHandle().connection == null || message == null || message.isEmpty()) return;
++ getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket(CraftChatMessage.fromStringOrNull(message)));
++ }
++
++ @Override
++ @Deprecated
++ public void sendActionBar(char alternateChar, String message) {
++ if (message == null || message.isEmpty()) return;
++ sendActionBar(org.bukkit.ChatColor.translateAlternateColorCodes(alternateChar, message));
++ }
++
+ @Override
+ public void setPlayerListHeaderFooter(BaseComponent[] header, BaseComponent[] footer) {
+ if (header != null) {