mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Message player only when enchants actually exist
This commit is contained in:
parent
655dcb1c9b
commit
df67bd6720
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user