mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
Add missing WEARABLE EnchantmentTarget
By: md_5 <git@md-5.net>
This commit is contained in:
parent
87a9de3ab8
commit
57b635b81d
1 changed files with 14 additions and 0 deletions
|
@ -160,6 +160,20 @@ public enum EnchantmentTarget {
|
|||
public boolean includes(Material item) {
|
||||
return item.getMaxDurability() > 0 && item.getMaxStackSize() == 1;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Allows the enchantment to be placed on wearable items.
|
||||
*/
|
||||
WEARABLE {
|
||||
@Override
|
||||
public boolean includes(Material item) {
|
||||
return ARMOR.includes(item)
|
||||
|| item.equals(Material.ELYTRA)
|
||||
|| item.equals(Material.PUMPKIN)
|
||||
|| item.equals(Material.JACK_O_LANTERN)
|
||||
|| item.equals(Material.SKULL_ITEM);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue