fixed the ability cooldown bar

This commit is contained in:
Indyuce 2021-12-27 12:39:03 +01:00
parent b6f8a8d9c3
commit b29105ae03

View File

@ -143,8 +143,7 @@ public abstract class RPGPlayer {
CooldownInfo info = playerData.getMMOPlayerData().getCooldownMap().getInfo(data.getAbility());
if (!data.getTriggerType().isSilent()) {
StringBuilder progressBar = new StringBuilder(ChatColor.YELLOW + "");
double progress = (info.getInitialCooldown() - info.getRemaining()) / info.getInitialCooldown();
double progress = (double) (info.getInitialCooldown() - info.getRemaining()) / info.getInitialCooldown() * 10;
String barChar = MMOItems.plugin.getConfig().getString("cooldown-progress-bar-char");
for (int j = 0; j < 10; j++)
progressBar.append(progress >= j ? ChatColor.GREEN : ChatColor.WHITE).append(barChar);