mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-27 06:31:57 +01:00
Add Enchantment#isTreasure()Z
Determines if the enchantment is a treasure enchantment - only available via means other than the enchantment table.
This commit is contained in:
parent
251a5b6382
commit
709783c131
1 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,11 @@ public class CraftEnchantment extends Enchantment {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTreasure() {
|
||||
return target.e(); // PAIL: isTreasure
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEnchantItem(ItemStack item) {
|
||||
return target.canEnchant(CraftItemStack.asNMSCopy(item));
|
||||
|
|
Loading…
Add table
Reference in a new issue