Add new enchants and fallback to bukkit enchant name map

This commit is contained in:
t00thpick1 2016-03-11 22:55:01 -05:00
parent cbf2f34f93
commit f3a8208425

View File

@ -31,6 +31,9 @@ public class EnchantmentUtils {
enchants.put("FLAME", Enchantment.ARROW_FIRE); enchants.put("FLAME", Enchantment.ARROW_FIRE);
enchants.put("KNOCKBACK", Enchantment.KNOCKBACK); enchants.put("KNOCKBACK", Enchantment.KNOCKBACK);
enchants.put("THORNS", Enchantment.THORNS); 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 enchants.get(enchantmentName);
} }
return null; return Enchantment.getByName(enchantmentName);
} }
} }