From 1f3f71ed1ca8f30b3dfda165b682608623fcb8a2 Mon Sep 17 00:00:00 2001 From: masmc05 Date: Tue, 24 Dec 2024 15:59:45 +0100 Subject: [PATCH] Add imports Dead from pleasure of doing this --- .../org/bukkit/craftbukkit/inventory/CraftItemStack.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index c4de9a4c4c..3799973696 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -5,6 +5,8 @@ import com.google.common.collect.ImmutableMap; import java.util.Collections; import java.util.Map; import java.util.Optional; +import io.papermc.paper.adventure.PaperAdventure; +import net.kyori.adventure.text.Component; import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.advancements.critereon.MinMaxBounds; import net.minecraft.core.Holder; @@ -25,6 +27,7 @@ import org.bukkit.enchantments.Enchantment; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.material.MaterialData; +import org.jetbrains.annotations.NotNull; @DelegateDeserialization(ItemStack.class) public final class CraftItemStack extends ItemStack { @@ -468,8 +471,8 @@ public final class CraftItemStack extends ItemStack { } @Override - public net.kyori.adventure.text.Component effectiveName() { - return this.handle == null ? net.kyori.adventure.text.Component.empty() : io.papermc.paper.adventure.PaperAdventure.asAdventure(this.handle.getStyledHoverName()); + public @NotNull Component effectiveName() { + return this.handle == null ? Component.empty() : PaperAdventure.asAdventure(this.handle.getStyledHoverName()); } @Override