mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Anvil API
This commit is contained in:
committed by
granny
parent
0a46145697
commit
30672ed8f7
@@ -0,0 +1,45 @@
|
||||
--- a/src/main/java/org/bukkit/inventory/AnvilInventory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/AnvilInventory.java
|
||||
@@ -138,4 +_,42 @@
|
||||
setItem(2, result);
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Purpur start
|
||||
+ /**
|
||||
+ * Gets if the player viewing the anvil inventory can bypass experience cost
|
||||
+ *
|
||||
+ * @return whether the player viewing the anvil inventory can bypass the experience cost
|
||||
+ * @deprecated use {@link AnvilView#canBypassCost()}.
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
+ boolean canBypassCost();
|
||||
+
|
||||
+ /**
|
||||
+ * Set if the player viewing the anvil inventory can bypass the experience cost
|
||||
+ *
|
||||
+ * @param bypassCost whether the player viewing the anvil inventory can bypass the experience cost
|
||||
+ * @deprecated use {@link AnvilView#setBypassCost(boolean)}.
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
+ void setBypassCost(boolean bypassCost);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the player viewing the anvil inventory can do unsafe enchants
|
||||
+ *
|
||||
+ * @return whether the player viewing the anvil inventory can do unsafe enchants
|
||||
+ * @deprecated use {@link AnvilView#canDoUnsafeEnchants()}.
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
+ boolean canDoUnsafeEnchants();
|
||||
+
|
||||
+ /**
|
||||
+ * Set if the player viewing the anvil inventory can do unsafe enchants
|
||||
+ *
|
||||
+ * @param canDoUnsafeEnchants whether the player viewing the anvil inventory can do unsafe enchants
|
||||
+ * @deprecated use {@link AnvilView#setDoUnsafeEnchants(boolean)}.
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
+ void setDoUnsafeEnchants(boolean canDoUnsafeEnchants);
|
||||
+ // Purpur end
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
--- a/src/main/java/org/bukkit/inventory/view/AnvilView.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/view/AnvilView.java
|
||||
@@ -89,4 +_,34 @@
|
||||
*/
|
||||
void bypassEnchantmentLevelRestriction(boolean bypassEnchantmentLevelRestriction);
|
||||
// Paper end - bypass anvil level restrictions
|
||||
+
|
||||
+ // Purpur start - Anvil API
|
||||
+ /**
|
||||
+ * Gets if the player viewing the anvil inventory can bypass experience cost
|
||||
+ *
|
||||
+ * @return whether the player viewing the anvil inventory can bypass the experience cost
|
||||
+ */
|
||||
+ boolean canBypassCost();
|
||||
+
|
||||
+ /**
|
||||
+ * Set if the player viewing the anvil inventory can bypass the experience cost
|
||||
+ *
|
||||
+ * @param bypassCost whether the player viewing the anvil inventory can bypass the experience cost
|
||||
+ */
|
||||
+ void setBypassCost(boolean bypassCost);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets if the player viewing the anvil inventory can do unsafe enchants
|
||||
+ *
|
||||
+ * @return whether the player viewing the anvil inventory can do unsafe enchants
|
||||
+ */
|
||||
+ boolean canDoUnsafeEnchants();
|
||||
+
|
||||
+ /**
|
||||
+ * Set if the player viewing the anvil inventory can do unsafe enchants
|
||||
+ *
|
||||
+ * @param canDoUnsafeEnchants whether the player viewing the anvil inventory can do unsafe enchants
|
||||
+ */
|
||||
+ void setDoUnsafeEnchants(boolean canDoUnsafeEnchants);
|
||||
+ // Purpur end - Anvil API
|
||||
}
|
||||
Reference in New Issue
Block a user