diff options
author | md_5 <git@md-5.net> | 2018-02-19 20:48:15 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-02-19 20:48:15 +1100 |
commit | 4751f9046965f288f477d331e5fd176bcbab85a7 (patch) | |
tree | f01e7b4785f36f2c7b02ecff8dfaf57d900c6c30 /src | |
parent | c03d8909d9822d1e8fe62a2e1550ae765f940893 (diff) | |
download | bukkit-4751f9046965f288f477d331e5fd176bcbab85a7.tar bukkit-4751f9046965f288f477d331e5fd176bcbab85a7.tar.gz bukkit-4751f9046965f288f477d331e5fd176bcbab85a7.tar.lz bukkit-4751f9046965f288f477d331e5fd176bcbab85a7.tar.xz bukkit-4751f9046965f288f477d331e5fd176bcbab85a7.zip |
Add missing WEARABLE EnchantmentTarget
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/enchantments/EnchantmentTarget.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java b/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java index c0f47b66..61067912 100644 --- a/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java +++ b/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java @@ -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); + } }; /** |