geforkt von Mirrors/Paper
Add missing rarity method on ItemStack (#5594)
Dieser Commit ist enthalten in:
Ursprung
4d8954ef25
Commit
784728bcc7
@ -86,3 +86,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
ItemMeta itemMeta = getItemMeta();
|
||||
return itemMeta != null && itemMeta.hasItemFlag(flag);
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the item rarity of the itemstack. The rarity can change based on enchantements.
|
||||
+ *
|
||||
+ * @return the itemstack rarity
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public io.papermc.paper.inventory.ItemRarity getRarity() {
|
||||
+ return Bukkit.getUnsafe().getItemStackRarity(this);
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren