diff --git a/paper-api/src/main/java/org/bukkit/enchantments/Enchantment.java b/paper-api/src/main/java/org/bukkit/enchantments/Enchantment.java index b6692fa46d..1c440e9977 100644 --- a/paper-api/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/paper-api/src/main/java/org/bukkit/enchantments/Enchantment.java @@ -214,6 +214,15 @@ public abstract class Enchantment { */ public abstract boolean isTreasure(); + /** + * Checks if this enchantment is a cursed enchantment + *
+ * Cursed enchantments are found the same way treasure enchantments are + * + * @return true if the enchantment is cursed + */ + public abstract boolean isCursed(); + /** * Check if this enchantment conflicts with another enchantment. * diff --git a/paper-api/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java b/paper-api/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java index 5ff4b48e37..3984e91926 100644 --- a/paper-api/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java +++ b/paper-api/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java @@ -49,6 +49,11 @@ public class EnchantmentWrapper extends Enchantment { return getEnchantment().isTreasure(); } + @Override + public boolean isCursed() { + return getEnchantment().isCursed(); + } + @Override public boolean conflictsWith(Enchantment other) { return getEnchantment().conflictsWith(other);