diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/enchantments/Enchantment.java | 9 | ||||
-rw-r--r-- | src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java index b6692fa4..1c440e99 100644 --- a/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/src/main/java/org/bukkit/enchantments/Enchantment.java @@ -215,6 +215,15 @@ public abstract class Enchantment { public abstract boolean isTreasure(); /** + * Checks if this enchantment is a cursed enchantment + * <br> + * 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. * * @param other The enchantment to check against diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java index 5ff4b48e..3984e919 100644 --- a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java +++ b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java @@ -50,6 +50,11 @@ public class EnchantmentWrapper extends Enchantment { } @Override + public boolean isCursed() { + return getEnchantment().isCursed(); + } + + @Override public boolean conflictsWith(Enchantment other) { return getEnchantment().conflictsWith(other); } |