mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-09-18 21:45:12 +00:00
Add missing WEARABLE EnchantmentTarget
This commit is contained in:
parent
c03d8909d9
commit
4751f90469
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…
Add table
Reference in a new issue