From f3a8208425d6e1507f45a643b235c87c06e8b3ad Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Fri, 11 Mar 2016 22:55:01 -0500 Subject: [PATCH] Add new enchants and fallback to bukkit enchant name map --- src/main/java/com/gmail/nossr50/util/EnchantmentUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/EnchantmentUtils.java b/src/main/java/com/gmail/nossr50/util/EnchantmentUtils.java index a4c493a91..b780e6551 100644 --- a/src/main/java/com/gmail/nossr50/util/EnchantmentUtils.java +++ b/src/main/java/com/gmail/nossr50/util/EnchantmentUtils.java @@ -31,6 +31,9 @@ public class EnchantmentUtils { enchants.put("FLAME", Enchantment.ARROW_FIRE); enchants.put("KNOCKBACK", Enchantment.KNOCKBACK); enchants.put("THORNS", Enchantment.THORNS); + enchants.put("MENDING", Enchantment.MENDING); + enchants.put("DEPTH_STRIDER", Enchantment.DEPTH_STRIDER); + enchants.put("FROST_WALKER", Enchantment.FROST_WALKER); } /** @@ -45,6 +48,6 @@ public class EnchantmentUtils { return enchants.get(enchantmentName); } - return null; + return Enchantment.getByName(enchantmentName); } }