diff options
author | Necrodoom <doomed.war@gmail.com> | 2014-08-05 16:37:35 +0300 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2014-08-11 00:11:06 +0100 |
commit | 49d80462d16cb79c05dddf83263ef794110dcd77 (patch) | |
tree | d793219be7acd8e86aa209455d13b00d4705ca6a | |
parent | 1d859e49add045163fb76e6786c474347af0f5ed (diff) | |
download | Essentials-49d80462d16cb79c05dddf83263ef794110dcd77.tar Essentials-49d80462d16cb79c05dddf83263ef794110dcd77.tar.gz Essentials-49d80462d16cb79c05dddf83263ef794110dcd77.tar.lz Essentials-49d80462d16cb79c05dddf83263ef794110dcd77.tar.xz Essentials-49d80462d16cb79c05dddf83263ef794110dcd77.zip |
Remove outdated try-catches
3 files changed, 18 insertions, 48 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Enchantments.java b/Essentials/src/com/earth2me/essentials/Enchantments.java index 12e846611..de987ba0f 100644 --- a/Essentials/src/com/earth2me/essentials/Enchantments.java +++ b/Essentials/src/com/earth2me/essentials/Enchantments.java @@ -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) diff --git a/Essentials/src/com/earth2me/essentials/Potions.java b/Essentials/src/com/earth2me/essentials/Potions.java index e79237a0f..616225814 100644 --- a/Essentials/src/com/earth2me/essentials/Potions.java +++ b/Essentials/src/com/earth2me/essentials/Potions.java @@ -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); - } - catch (java.lang.NoSuchFieldError e) - { - Essentials.wrongVersion(); - } + POTIONS.put("saturation", PotionEffectType.SATURATION); + ALIASPOTIONS.put("food", PotionEffectType.SATURATION); - 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) diff --git a/Essentials/src/com/earth2me/essentials/utils/LocationUtil.java b/Essentials/src/com/earth2me/essentials/utils/LocationUtil.java index 7a98a577f..8f0b926fc 100644 --- a/Essentials/src/com/earth2me/essentials/utils/LocationUtil.java +++ b/Essentials/src/com/earth2me/essentials/utils/LocationUtil.java @@ -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) { |