mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-14 03:41:34 +01:00
Implement isCursed for new enchantments
By: Senmori <thesenmori@gmail.com>
This commit is contained in:
parent
14f3943d53
commit
3b75b77e6e
2 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue