deprecate our ItemRarity API
This commit is contained in:
@@ -9,9 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -0,0 +0,0 @@ public interface UnsafeValues {
|
||||
* @return the server's protocol version
|
||||
*/
|
||||
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
||||
|
||||
int getProtocolVersion();
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if an itemstack can be repaired with another itemstack.
|
||||
+ * Returns false if either argument's type is not an item ({@link Material#isItem()}).
|
||||
@@ -21,17 +22,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @return true if valid repair, false if not
|
||||
+ */
|
||||
+ public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);
|
||||
+
|
||||
/**
|
||||
* Returns the server's protocol version.
|
||||
*
|
||||
// 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, Translat
|
||||
public io.papermc.paper.inventory.ItemRarity getRarity() {
|
||||
return Bukkit.getUnsafe().getItemStackRarity(this);
|
||||
return io.papermc.paper.inventory.ItemRarity.valueOf(this.getItemMeta().getRarity().name());
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
|
||||
Reference in New Issue
Block a user