Commits

md_5 authored 4751f904696
Add missing WEARABLE EnchantmentTarget
No tags

src/main/java/org/bukkit/enchantments/EnchantmentTarget.java

Modified
153 153 },
154 154
155 155 /**
156 156 * Allows the enchantment to be placed on items with durability.
157 157 */
158 158 BREAKABLE {
159 159 @Override
160 160 public boolean includes(Material item) {
161 161 return item.getMaxDurability() > 0 && item.getMaxStackSize() == 1;
162 162 }
163 + },
164 +
165 + /**
166 + * Allows the enchantment to be placed on wearable items.
167 + */
168 + WEARABLE {
169 + @Override
170 + public boolean includes(Material item) {
171 + return ARMOR.includes(item)
172 + || item.equals(Material.ELYTRA)
173 + || item.equals(Material.PUMPKIN)
174 + || item.equals(Material.JACK_O_LANTERN)
175 + || item.equals(Material.SKULL_ITEM);
176 + }
163 177 };
164 178
165 179 /**
166 180 * Check whether this target includes the specified item.
167 181 *
168 182 * @param item The item to check
169 183 * @return True if the target includes the item
170 184 */
171 185 public abstract boolean includes(Material item);
172 186

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut