aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0254-Improve-Item-Rarity-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/api/0254-Improve-Item-Rarity-API.patch')
-rw-r--r--patches/api/0254-Improve-Item-Rarity-API.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/api/0254-Improve-Item-Rarity-API.patch b/patches/api/0254-Improve-Item-Rarity-API.patch
index 4a53134873..0882e2924c 100644
--- a/patches/api/0254-Improve-Item-Rarity-API.patch
+++ b/patches/api/0254-Improve-Item-Rarity-API.patch
@@ -131,3 +131,21 @@ index ef36a696f2f926d70c5d93ce08f75fa9a749e32f..fb1d7ff51f267225ac76c29a56d67fb4
+ }
// Paper end
}
+diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
+index 5dd1c084e42ee93f3a358f58ed76b0a7d36f0713..2b5a18fe7e885fa9b581c0afb299e31f3db2690c 100644
+--- a/src/main/java/org/bukkit/inventory/ItemType.java
++++ b/src/main/java/org/bukkit/inventory/ItemType.java
+@@ -2311,4 +2311,13 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
+ @Override
+ @NotNull String getTranslationKey();
+ // Paper end - add Translatable
++
++ // Paper start - expand ItemRarity API
++ /**
++ * Returns the item rarity for the item.
++ *
++ * @return the item rarity (or null if none is set)
++ */
++ @Nullable ItemRarity getItemRarity();
++ // Paper end - expand ItemRarity API
+ }