Skip to content

Commit

Permalink
Fix issues with delay ticks for Folia scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
NahuLD committed Aug 1, 2023
1 parent 548deb8 commit 104e1f6
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -98,6 +98,9 @@ public void cancelTask(@NotNull WrappedTask wrappedTask) {

@Override
public @NotNull WrappedTask runTaskLater(@NotNull Runnable runnable, long delay) {
if (delay <= 0) {
return runTask(runnable);
}
return new FoliaWrappedTask(globalRegionScheduler.runDelayed(plugin, task -> runnable.run(), delay));
}

Expand Down

0 comments on commit 104e1f6

Please sign in to comment.