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) { private void addEnchants(ItemStack item) {
Player player = getPlayer(); Player player = getPlayer();
if (Permissions.arcaneBypass(player)) {
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Perfect"));
return;
}
Map<Enchantment, Integer> enchants = item.getEnchantments(); Map<Enchantment, Integer> enchants = item.getEnchantments();
if (enchants.isEmpty()) { if (enchants.isEmpty()) {
return; return;
} }
if (Permissions.arcaneBypass(player)) {
player.sendMessage(LocaleLoader.getString("Repair.Arcane.Perfect"));
return;
}
if (getArcaneForgingRank() == 0 || !Permissions.arcaneForging(player)) { if (getArcaneForgingRank() == 0 || !Permissions.arcaneForging(player)) {
for (Enchantment enchant : enchants.keySet()) { for (Enchantment enchant : enchants.keySet()) {
item.removeEnchantment(enchant); item.removeEnchantment(enchant);