aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0821-Nameable-Banner-API.patch
diff options
context:
space:
mode:
authorTamion <[email protected]>2023-11-04 21:20:13 +0100
committerGitHub <[email protected]>2023-11-04 13:20:13 -0700
commitbffb08c2f99a5527b7357d005cb10ba21cf048d9 (patch)
treec25ad5490b0ede8ce30bc0f23b5e0255eecc0dbc /patches/server/0821-Nameable-Banner-API.patch
parent6592fed511ee2ea17de9e05463579bd1923cf8aa (diff)
downloadPaper-bffb08c2f99a5527b7357d005cb10ba21cf048d9.tar.gz
Paper-bffb08c2f99a5527b7357d005cb10ba21cf048d9.zip
Deprecate Player#boostElytra (#9899)
The Paper method was chosen for deprecation because it was more restrictive in that it has an isGliding check.
Diffstat (limited to 'patches/server/0821-Nameable-Banner-API.patch')
-rw-r--r--patches/server/0821-Nameable-Banner-API.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/patches/server/0821-Nameable-Banner-API.patch b/patches/server/0821-Nameable-Banner-API.patch
new file mode 100644
index 0000000000..351d3597e0
--- /dev/null
+++ b/patches/server/0821-Nameable-Banner-API.patch
@@ -0,0 +1,37 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Owen1212055 <[email protected]>
+Date: Thu, 7 Apr 2022 17:49:25 -0400
+Subject: [PATCH] Nameable Banner API
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
+index 2b7fcd30b6eb0ab60b44de31ad0e0b20033f45c5..0a80bd370dd41ffbfbbe6b0d88cd6fa8a47a5725 100644
+--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
+@@ -108,4 +108,26 @@ public class CraftBanner extends CraftBlockEntityState<BannerBlockEntity> implem
+ public CraftBanner copy() {
+ return new CraftBanner(this);
+ }
++
++ // Paper start
++ @Override
++ public net.kyori.adventure.text.Component customName() {
++ return io.papermc.paper.adventure.PaperAdventure.asAdventure(this.getSnapshot().getCustomName());
++ }
++
++ @Override
++ public void customName(net.kyori.adventure.text.Component customName) {
++ this.getSnapshot().setCustomName(io.papermc.paper.adventure.PaperAdventure.asVanilla(customName));
++ }
++
++ @Override
++ public String getCustomName() {
++ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serializeOrNull(this.customName());
++ }
++
++ @Override
++ public void setCustomName(String name) {
++ this.customName(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserializeOrNull(name));
++ }
++ // Paper end
+ }