From df67bd672098de2c10474d22dbb74dea68cf7459 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Sat, 9 Mar 2013 20:05:15 -0500 Subject: [PATCH] Message player only when enchants actually exist --- .../com/gmail/nossr50/skills/repair/RepairManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java index a5cc6811b..0e4d101b1 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java @@ -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 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);