aboutsummaryrefslogtreecommitdiffstats
path: root/bukkit
diff options
context:
space:
mode:
authorNahuel Dolores <contact@nahu.me>2023-08-01 13:20:11 -0300
committerNahuel Dolores <contact@nahu.me>2023-08-01 13:20:11 -0300
commit104e1f66a99f0bea00828e51d8c8ceb19a61904d (patch)
tree7e230dba19cb84887fd90ef89c17f4f1af917eb1 /bukkit
parent548deb8d5903891eac00f2a08fa21e3bde5766e6 (diff)
Fix issues with delay ticks for Folia scheduler
Diffstat (limited to 'bukkit')
-rw-r--r--bukkit/src/main/java/com/leonardobishop/quests/bukkit/scheduler/folia/FoliaServerScheduler.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/scheduler/folia/FoliaServerScheduler.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/scheduler/folia/FoliaServerScheduler.java
index 0bc24794..2d1e378e 100644
--- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/scheduler/folia/FoliaServerScheduler.java
+++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/scheduler/folia/FoliaServerScheduler.java
@@ -98,6 +98,9 @@ public class FoliaServerScheduler implements ServerScheduler {
@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));
}