Remove useless try and catch

Former-commit-id: 5c357fe33d95aa0fb4ebc4536e32ed169a2b775f [formerly b22351985c06095bbe515775ad60408fe10ca893]
Former-commit-id: c4d6ff2102b3af89e6a8e95a30d54d7487b2d859
This commit is contained in:
Ghost_chu committed 2018-12-04 14:41:57 +08:00
1 parent 15b4f53aab
commit ea7462b03b
1 file changed
-14
@@ -520,16 +520,8 @@ public class MsgUtil {
p.sendMessage(ChatColor.DARK_PURPLE + "+---------------------------------------------------+");
p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.getMessage("menu.shop-information"));
p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.getMessage("menu.owner", shop.ownerName()));
//p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.getMessage("menu.item", MsgUtil.getItemi18n(shop.getDataName())));
//Enabled
Util.sendItemholochat(shop.getItem(),p,ChatColor.DARK_PURPLE + "| " + MsgUtil.getMessage("menu.item", MsgUtil.getDisplayName(shop.getItem())));
// if (NMS.isPotion(items.getType())) {
// String effects = CustomPotionsName.getEffects(items);
// if (!effects.isEmpty()) {
// p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.getMessage("menu.effects", effects));
// }
// }
if (Util.isTool(items.getType())) {
p.sendMessage(ChatColor.DARK_PURPLE + "| " + MsgUtil.getMessage("menu.damage-percent-remaining", Util.getToolPercentage(items)));
}
@@ -558,8 +550,6 @@ public class MsgUtil {
p.sendMessage(ChatColor.DARK_PURPLE + "| " + ChatColor.YELLOW + MsgUtil.getEnchi18n(entries.getKey()) + " " + entries.getValue());
}
}
try {
Class.forName("org.bukkit.inventory.meta.EnchantmentStorageMeta");
if (items.getItemMeta() instanceof EnchantmentStorageMeta) {
EnchantmentStorageMeta stor = (EnchantmentStorageMeta) items.getItemMeta();
stor.getStoredEnchants();
@@ -571,10 +561,6 @@ public class MsgUtil {
}
}
}
} catch (ClassNotFoundException e) {
// They don't have an up to date enough build of CB to do this.
// TODO: Remove this when it becomes redundant
}
p.sendMessage(ChatColor.DARK_PURPLE + "+---------------------------------------------------+");
}