Message player only when enchants actually exist

This commit is contained in:
t00thpick1 2013-03-09 20:05:15 -05:00
parent 655dcb1c9b
commit df67bd6720

View File

@ -297,17 +297,17 @@ public class RepairManager extends SkillManager {
private void addEnchants(ItemStack item) {
Player player = getPlayer();
if (Permissions.arcaneBypass(player)) {
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Perfect"));
return;
}
Map<Enchantment, Integer> enchants = item.getEnchantments();
if (enchants.isEmpty()) {
return;
}
if (Permissions.arcaneBypass(player)) {
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Perfect"));
return;
}
if (getArcaneForgingRank() == 0 || !Permissions.arcaneForging(player)) {
for (Enchantment enchant : enchants.keySet()) {
item.removeEnchantment(enchant);