Skip to content

Commit

Permalink
Made boss bar tasks async
Browse files Browse the repository at this point in the history
  • Loading branch information
tajobe committed Mar 6, 2016
1 parent 0d360a9 commit 0d5320a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void run()
final BukkitTask animationTask;
if (animate)
{
animationTask = Bukkit.getScheduler().runTaskTimer(plugin, () ->
animationTask = Bukkit.getScheduler().runTaskTimerAsynchronously(plugin, () ->
bossBar.setProgress(bossBar.getProgress() + ((reverse ? -1 : 1) * (1.0 / holdTime)))
, 0, 1L);
}
Expand All @@ -78,7 +78,7 @@ public void run()

// schedule boss bar to go away
Runnable hideBossBar = message instanceof RepeatingMessage ? bossBar::hide : bossBar::removeAll;
Bukkit.getScheduler().runTaskLater(plugin, () ->
Bukkit.getScheduler().runTaskLaterAsynchronously(plugin, () ->
{
// reset progress
bossBar.setProgress(reverse ? 1 : 0);
Expand Down

0 comments on commit 0d5320a

Please sign in to comment.