Skip to content

Commit

Permalink
Revert "fix animate_progess option to update correctly after plugin r…
Browse files Browse the repository at this point in the history
…eload"

This reverts commit c58baff.
  • Loading branch information
IamMusavaRibica committed Jul 8, 2024
1 parent 584eecd commit fa00198
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class BossBarManager implements Listener {
private NumberFormat moneyFormat;
private final AuraSkills plugin;
private final TextFormatter tf = new TextFormatter();
private final boolean ANIMATE_PROGRESS;

public BossBarManager(AuraSkills plugin) {
this.bossBars = new HashMap<>();
Expand All @@ -56,6 +57,7 @@ public BossBarManager(AuraSkills plugin) {
this.checkCurrentActions = new HashMap<>();
this.singleCheckCurrentActions = new HashMap<>();
loadNumberFormats();
this.ANIMATE_PROGRESS = plugin.configBoolean(Option.BOSS_BAR_ANIMATE_PROGRESS);
}

public NumberFormat getXpFormat() {
Expand Down Expand Up @@ -182,7 +184,6 @@ public void sendBossBar(Player player, Skill skill, double currentXp, double lev
}

private BossBar handleNewBossBar(Player player, Skill skill, float progressOld, float progressNew, String text) {
final boolean ANIMATE_PROGRESS = plugin.configBoolean(Option.BOSS_BAR_ANIMATE_PROGRESS);
BossBar.Color color = getColor(skill);
BossBar.Overlay overlay = getOverlay(skill);

Expand All @@ -206,7 +207,6 @@ private BossBar handleNewBossBar(Player player, Skill skill, float progressOld,
}

private void handleExistingBossBar(BossBar bossBar, Player player, Skill skill, float progress, String text) {
final boolean ANIMATE_PROGRESS = plugin.configBoolean(Option.BOSS_BAR_ANIMATE_PROGRESS);
Component name = tf.toComponent(text);

if (!ANIMATE_PROGRESS) { // Update boss bar progress immediately
Expand Down

0 comments on commit fa00198

Please sign in to comment.