mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-25 07:59:44 +00:00
parent
5e9f5904fd
commit
af02a28ce5
3 changed files with 22 additions and 3 deletions
|
@ -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)
|
||||
|
|
BIN
lib/bukkit.jar
BIN
lib/bukkit.jar
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue