Skip to content

Commit 49d8046

Browse files
necrodoomkhobbits
authored andcommitted
Remove outdated try-catches
1 parent 1d859e4 commit 49d8046

File tree

3 files changed

+18
-48
lines changed

3 files changed

+18
-48
lines changed

Essentials/src/com/earth2me/essentials/Enchantments.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,13 @@ public class Enchantments
142142
ALIASENCHANTMENTS.put("unlimitedarrows", Enchantment.ARROW_INFINITE);
143143
ALIASENCHANTMENTS.put("ai", Enchantment.ARROW_INFINITE);
144144

145-
try // 1.7 update
146-
{
147-
ENCHANTMENTS.put("luck", Enchantment.LUCK);
148-
ALIASENCHANTMENTS.put("luckofsea", Enchantment.LUCK);
149-
ALIASENCHANTMENTS.put("luckofseas", Enchantment.LUCK);
150-
ALIASENCHANTMENTS.put("rodluck", Enchantment.LUCK);
145+
ENCHANTMENTS.put("luck", Enchantment.LUCK);
146+
ALIASENCHANTMENTS.put("luckofsea", Enchantment.LUCK);
147+
ALIASENCHANTMENTS.put("luckofseas", Enchantment.LUCK);
148+
ALIASENCHANTMENTS.put("rodluck", Enchantment.LUCK);
151149

152-
ENCHANTMENTS.put("lure", Enchantment.LURE);
153-
ALIASENCHANTMENTS.put("rodlure", Enchantment.LURE);
154-
}
155-
catch (java.lang.NoSuchFieldError e)
156-
{
157-
Essentials.wrongVersion();
158-
}
150+
ENCHANTMENTS.put("lure", Enchantment.LURE);
151+
ALIASENCHANTMENTS.put("rodlure", Enchantment.LURE);
159152
}
160153

161154
public static Enchantment getByName(String name)

Essentials/src/com/earth2me/essentials/Potions.java

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -100,35 +100,20 @@ public class Potions
100100
POTIONS.put("wither", PotionEffectType.WITHER);
101101
ALIASPOTIONS.put("decay", PotionEffectType.WITHER);
102102

103+
POTIONS.put("healthboost", PotionEffectType.HEALTH_BOOST);
104+
ALIASPOTIONS.put("boost", PotionEffectType.HEALTH_BOOST);
103105

104-
try // 1.6 update
105-
{
106-
POTIONS.put("healthboost", PotionEffectType.HEALTH_BOOST);
107-
ALIASPOTIONS.put("boost", PotionEffectType.HEALTH_BOOST);
108-
109-
POTIONS.put("absorption", PotionEffectType.ABSORPTION);
110-
ALIASPOTIONS.put("absorb", PotionEffectType.ABSORPTION);
106+
POTIONS.put("absorption", PotionEffectType.ABSORPTION);
107+
ALIASPOTIONS.put("absorb", PotionEffectType.ABSORPTION);
111108

112-
POTIONS.put("saturation", PotionEffectType.SATURATION);
113-
ALIASPOTIONS.put("food", PotionEffectType.SATURATION);
114-
}
115-
catch (java.lang.NoSuchFieldError e)
116-
{
117-
Essentials.wrongVersion();
118-
}
109+
POTIONS.put("saturation", PotionEffectType.SATURATION);
110+
ALIASPOTIONS.put("food", PotionEffectType.SATURATION);
119111

120-
try // 1.7 update
121-
{
122-
POTIONS.put("waterbreathing", PotionEffectType.WATER_BREATHING);
123-
ALIASPOTIONS.put("underwaterbreathing", PotionEffectType.WATER_BREATHING);
124-
ALIASPOTIONS.put("waterbreath", PotionEffectType.WATER_BREATHING);
125-
ALIASPOTIONS.put("underwaterbreath", PotionEffectType.WATER_BREATHING);
126-
ALIASPOTIONS.put("air", PotionEffectType.WATER_BREATHING);
127-
}
128-
catch (java.lang.NoSuchFieldError e)
129-
{
130-
Essentials.wrongVersion();
131-
}
112+
POTIONS.put("waterbreathing", PotionEffectType.WATER_BREATHING);
113+
ALIASPOTIONS.put("underwaterbreathing", PotionEffectType.WATER_BREATHING);
114+
ALIASPOTIONS.put("waterbreath", PotionEffectType.WATER_BREATHING);
115+
ALIASPOTIONS.put("underwaterbreath", PotionEffectType.WATER_BREATHING);
116+
ALIASPOTIONS.put("air", PotionEffectType.WATER_BREATHING);
132117
}
133118

134119
public static PotionEffectType getByName(String name)

Essentials/src/com/earth2me/essentials/utils/LocationUtil.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,7 @@ public class LocationUtil
6161
HOLLOW_MATERIALS.add(Material.FENCE_GATE.getId());
6262
HOLLOW_MATERIALS.add(Material.WATER_LILY.getId());
6363
HOLLOW_MATERIALS.add(Material.NETHER_WARTS.getId());
64-
65-
try // 1.6 update
66-
{
67-
HOLLOW_MATERIALS.add(Material.CARPET.getId());
68-
}
69-
catch (java.lang.NoSuchFieldError e)
70-
{
71-
Essentials.wrongVersion();
72-
}
64+
HOLLOW_MATERIALS.add(Material.CARPET.getId());
7365

7466
for (Integer integer : HOLLOW_MATERIALS)
7567
{

0 commit comments

Comments
 (0)