mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Remove outdated try-catches
This commit is contained in:
parent
1d859e49ad
commit
49d80462d1
3 changed files with 18 additions and 48 deletions
|
@ -142,20 +142,13 @@ public class Enchantments
|
|||
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("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();
|
||||
}
|
||||
ENCHANTMENTS.put("lure", Enchantment.LURE);
|
||||
ALIASENCHANTMENTS.put("rodlure", Enchantment.LURE);
|
||||
}
|
||||
|
||||
public static Enchantment getByName(String name)
|
||||
|
|
|
@ -100,35 +100,20 @@ public class Potions
|
|||
POTIONS.put("wither", PotionEffectType.WITHER);
|
||||
ALIASPOTIONS.put("decay", PotionEffectType.WITHER);
|
||||
|
||||
POTIONS.put("healthboost", PotionEffectType.HEALTH_BOOST);
|
||||
ALIASPOTIONS.put("boost", PotionEffectType.HEALTH_BOOST);
|
||||
|
||||
try // 1.6 update
|
||||
{
|
||||
POTIONS.put("healthboost", PotionEffectType.HEALTH_BOOST);
|
||||
ALIASPOTIONS.put("boost", PotionEffectType.HEALTH_BOOST);
|
||||
POTIONS.put("absorption", PotionEffectType.ABSORPTION);
|
||||
ALIASPOTIONS.put("absorb", PotionEffectType.ABSORPTION);
|
||||
|
||||
POTIONS.put("absorption", PotionEffectType.ABSORPTION);
|
||||
ALIASPOTIONS.put("absorb", PotionEffectType.ABSORPTION);
|
||||
POTIONS.put("saturation", PotionEffectType.SATURATION);
|
||||
ALIASPOTIONS.put("food", PotionEffectType.SATURATION);
|
||||
|
||||
POTIONS.put("saturation", PotionEffectType.SATURATION);
|
||||
ALIASPOTIONS.put("food", PotionEffectType.SATURATION);
|
||||
}
|
||||
catch (java.lang.NoSuchFieldError e)
|
||||
{
|
||||
Essentials.wrongVersion();
|
||||
}
|
||||
|
||||
try // 1.7 update
|
||||
{
|
||||
POTIONS.put("waterbreathing", PotionEffectType.WATER_BREATHING);
|
||||
ALIASPOTIONS.put("underwaterbreathing", PotionEffectType.WATER_BREATHING);
|
||||
ALIASPOTIONS.put("waterbreath", PotionEffectType.WATER_BREATHING);
|
||||
ALIASPOTIONS.put("underwaterbreath", PotionEffectType.WATER_BREATHING);
|
||||
ALIASPOTIONS.put("air", PotionEffectType.WATER_BREATHING);
|
||||
}
|
||||
catch (java.lang.NoSuchFieldError e)
|
||||
{
|
||||
Essentials.wrongVersion();
|
||||
}
|
||||
POTIONS.put("waterbreathing", PotionEffectType.WATER_BREATHING);
|
||||
ALIASPOTIONS.put("underwaterbreathing", PotionEffectType.WATER_BREATHING);
|
||||
ALIASPOTIONS.put("waterbreath", PotionEffectType.WATER_BREATHING);
|
||||
ALIASPOTIONS.put("underwaterbreath", PotionEffectType.WATER_BREATHING);
|
||||
ALIASPOTIONS.put("air", PotionEffectType.WATER_BREATHING);
|
||||
}
|
||||
|
||||
public static PotionEffectType getByName(String name)
|
||||
|
|
|
@ -61,15 +61,7 @@ public class LocationUtil
|
|||
HOLLOW_MATERIALS.add(Material.FENCE_GATE.getId());
|
||||
HOLLOW_MATERIALS.add(Material.WATER_LILY.getId());
|
||||
HOLLOW_MATERIALS.add(Material.NETHER_WARTS.getId());
|
||||
|
||||
try // 1.6 update
|
||||
{
|
||||
HOLLOW_MATERIALS.add(Material.CARPET.getId());
|
||||
}
|
||||
catch (java.lang.NoSuchFieldError e)
|
||||
{
|
||||
Essentials.wrongVersion();
|
||||
}
|
||||
HOLLOW_MATERIALS.add(Material.CARPET.getId());
|
||||
|
||||
for (Integer integer : HOLLOW_MATERIALS)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue