diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/enchantments/Enchantment.java | 10 | ||||
-rw-r--r-- | src/main/java/org/bukkit/enchantments/EnchantmentTarget.java | 11 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java index b6cfaea0..61a8bca6 100644 --- a/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/src/main/java/org/bukkit/enchantments/Enchantment.java @@ -120,6 +120,16 @@ public abstract class Enchantment { */ public static final Enchantment ARROW_INFINITE = new EnchantmentWrapper(51); + /** + * Decreases odds of catching worthless junk + */ + public static final Enchantment LUCK = new EnchantmentWrapper(61); + + /** + * Increases rate of fish biting your hook + */ + public static final Enchantment LURE = new EnchantmentWrapper(62); + private static final Map<Integer, Enchantment> byId = new HashMap<Integer, Enchantment>(); private static final Map<String, Enchantment> byName = new HashMap<String, Enchantment>(); private static boolean acceptingNew = true; diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java b/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java index 4a981a4a..6578b36a 100644 --- a/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java +++ b/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java @@ -127,7 +127,6 @@ public enum EnchantmentTarget { || item.equals(Material.DIAMOND_AXE) || item.equals(Material.GOLD_AXE) || item.equals(Material.SHEARS) // NOTE: No vanilla enchantments for this - || item.equals(Material.FISHING_ROD) // NOTE: No vanilla enchantments for this || item.equals(Material.FLINT_AND_STEEL); // NOTE: No vanilla enchantments for this } }, @@ -140,6 +139,16 @@ public enum EnchantmentTarget { public boolean includes(Material item) { return item.equals(Material.BOW); } + }, + + /** + * Allows the Enchantment to be placed on fishing rods. + */ + FISHING_ROD { + @Override + public boolean includes(Material item) { + return item.equals(Material.FISHING_ROD); + } }; /** |