summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/enchantments/EnchantmentTarget.java14
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);
+ }
};
/**