diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java index 96dfcfa12c..d3f650d040 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java @@ -262,4 +262,12 @@ public class CraftItemType implements ItemType.Typed, Han return this.item.getDescriptionId(); } // Paper end - add Translatable + + // Paper start - expand ItemRarity API + @Override + public org.bukkit.inventory.ItemRarity getItemRarity() { + final net.minecraft.world.item.Rarity rarity = this.item.components().get(DataComponents.RARITY); + return rarity == null ? null : org.bukkit.inventory.ItemRarity.valueOf(rarity.name()); + } + // Paper end - expand ItemRarity API }