Removes color codes from logging

This commit is contained in:
Christian Koop 2022-03-18 17:50:26 +01:00
parent 4dcf2db057
commit 0a3bafb953
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
1 changed files with 4 additions and 5 deletions

View File

@ -2,7 +2,6 @@ package com.songoda.epicvouchers.voucher;
import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.compatibility.ServerVersion;
import com.songoda.core.utils.TextUtils;
import com.songoda.epicvouchers.EpicVouchers;
import com.songoda.epicvouchers.events.VoucherRedeemEvent;
import com.songoda.epicvouchers.listeners.PlayerCommandListener;
@ -167,13 +166,13 @@ public class VoucherExecutor {
player.addPotionEffect(new PotionEffect(PotionEffectType.getByName(effect), duration, amplifier));
}
instance.getLogger().log(Level.INFO, TextUtils.formatText("&f" + player.getName() + " has successfully redeemed the voucher " + voucher.getKey() + "."));
instance.getLogger().log(Level.INFO, player.getName() + " has successfully redeemed the voucher " + voucher.getKey() + ".");
instance.getConnections().saveRedeem(player, voucher.getName(true));
} else {
instance.getLogger().log(Level.WARNING, TextUtils.formatText("&c" + player.getName() + " has failed to duplicate the voucher " + voucher.getKey() + "."));
instance.getLogger().log(Level.WARNING, player.getName() + " has failed to duplicate the voucher " + voucher.getKey() + ".");
}
} catch (Exception error) {
instance.getLogger().log(Level.SEVERE, TextUtils.formatText("&cFailed to redeem the voucher " + voucher.getKey() + " for the player " + player.getName() + "."));
instance.getLogger().log(Level.SEVERE, "Failed to redeem the voucher " + voucher.getKey() + " for the player " + player.getName() + ".");
instance.getLogger().log(Level.SEVERE, error.getMessage());
error.printStackTrace();
}
@ -202,4 +201,4 @@ public class VoucherExecutor {
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), command);
}
}
}
}