Skip to content

Commit

Permalink
Changed bossbar tasks to be synchronous to prevent CMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
tajobe committed Apr 25, 2016
1 parent 6748bd7 commit ad9f515
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void run()
final BukkitTask animationTask;
if (animate)
{
animationTask = Bukkit.getScheduler().runTaskTimerAsynchronously(plugin, () ->
animationTask = Bukkit.getScheduler().runTaskTimer(plugin, () ->
{
// calculate next progress bar step
double progress = bossBar.getProgress() + ((reverse ? -1 : 1) * (1.0 / holdTime));
Expand All @@ -95,7 +95,7 @@ else if (progress > 1)
}

// schedule boss bar to go away
Bukkit.getScheduler().runTaskLaterAsynchronously(plugin, () ->
Bukkit.getScheduler().runTaskLater(plugin, () ->
{
// reset progress
bossBar.setProgress(reverse ? 1 : 0);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: SimpleAnnounce
main: org.simplemc.simpleannounce.SimpleAnnounce
version: 1.9.2
version: 1.9.3
website: http://SimpleMC.org/simpleannounce/
author: Taylor Becker
permissions:
Expand Down

0 comments on commit ad9f515

Please sign in to comment.