Update Bukkit

Bukkit: #1859 CB: #2943
This commit is contained in:
KHobbits 2013-12-07 22:24:01 +00:00
parent 5e9f5904fd
commit af02a28ce5
3 changed files with 22 additions and 3 deletions

View File

@ -141,13 +141,32 @@ public class Enchantments
ALIASENCHANTMENTS.put("unlimited", Enchantment.ARROW_INFINITE);
ALIASENCHANTMENTS.put("unlimitedarrows", Enchantment.ARROW_INFINITE);
ALIASENCHANTMENTS.put("ai", Enchantment.ARROW_INFINITE);
try // 1.7 update
{
ENCHANTMENTS.put("luck", Enchantment.LUCK);
ALIASENCHANTMENTS.put("luckofsea", Enchantment.LUCK);
ALIASENCHANTMENTS.put("luckofseas", Enchantment.LUCK);
ALIASENCHANTMENTS.put("rodluck", Enchantment.LUCK);
ENCHANTMENTS.put("lure", Enchantment.LURE);
ALIASENCHANTMENTS.put("rodlure", Enchantment.LURE);
}
catch (java.lang.NoSuchFieldError e)
{
Essentials.wrongVersion();
}
}
public static Enchantment getByName(String name) {
public static Enchantment getByName(String name)
{
Enchantment enchantment;
if (NumberUtil.isInt(name)) {
if (NumberUtil.isInt(name))
{
enchantment = Enchantment.getById(Integer.parseInt(name));
} else {
}
else
{
enchantment = Enchantment.getByName(name.toUpperCase(Locale.ENGLISH));
}
if (enchantment == null)

Binary file not shown.

Binary file not shown.