From edbc189b98197597619134e838ce775efc13a016 Mon Sep 17 00:00:00 2001 From: jglrxavpok Date: Fri, 1 May 2020 23:35:56 +0200 Subject: [PATCH] Set lastUpdateTime on task creation, otherwise delayed task won't be delayed --- src/main/java/net/minestom/server/timer/SchedulerManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/minestom/server/timer/SchedulerManager.java b/src/main/java/net/minestom/server/timer/SchedulerManager.java index b5161c2d2..9d2b58167 100644 --- a/src/main/java/net/minestom/server/timer/SchedulerManager.java +++ b/src/main/java/net/minestom/server/timer/SchedulerManager.java @@ -23,6 +23,7 @@ public class SchedulerManager { runnable.setId(id); Task task = new Task(runnable, updateOption, maxCallCount); + task.refreshLastUpdateTime(System.currentTimeMillis()); this.tasks.add(task); return id;