From 4bae091802b566208d274645594c3ffff1cf5931 Mon Sep 17 00:00:00 2001 From: kokiriglade <60290002+celerry@users.noreply.github.com> Date: Sat, 23 Nov 2024 18:58:49 +0000 Subject: [PATCH] Expanded Art API --- .../java/org/bukkit/craftbukkit/CraftArt.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftArt.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftArt.java index a32874e415..0207c7c507 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftArt.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftArt.java @@ -75,6 +75,22 @@ public class CraftArt implements Art, Handleable { return this.paintingVariant.height(); } + // Paper start - Expand Art API + @Override + public net.kyori.adventure.text.Component title() { + return this.paintingVariant.title().map(io.papermc.paper.adventure.PaperAdventure::asAdventure).orElse(null); + } + + @Override + public net.kyori.adventure.text.Component author() { + return this.paintingVariant.author().map(io.papermc.paper.adventure.PaperAdventure::asAdventure).orElse(null); + } + + public net.kyori.adventure.key.Key assetId() { + return io.papermc.paper.adventure.PaperAdventure.asAdventure(this.paintingVariant.assetId()); + } + // Paper end - Expand Art API + @Override public int getId() { return CraftRegistry.getMinecraftRegistry(Registries.PAINTING_VARIANT).getId(this.paintingVariant);