mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 11:15:57 -07:00
Implement isCursed for new enchantments
By: Senmori <thesenmori@gmail.com>
This commit is contained in:
@@ -214,6 +214,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.
|
||||
*
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user