From 140cd61fd65c39640a70c34454a6a94d21ab8ed8 Mon Sep 17 00:00:00 2001 From: Rockyers Date: Sun, 13 Aug 2023 19:39:26 -0700 Subject: [PATCH] Replace Bukkit schedulers in UUIDUpdateAsyncTask.java --- .../nossr50/runnables/database/UUIDUpdateAsyncTask.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java b/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java index fe7a029a7..fc59bf2df 100644 --- a/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import java.util.logging.Level; public class UUIDUpdateAsyncTask implements Runnable { @@ -109,11 +110,11 @@ public class UUIDUpdateAsyncTask implements Runnable { // Bukkit runnables don't let themselves reschedule themselves, so we are a pseudo bukkit runnable. private void runTaskLaterAsynchronously(mcMMO plugin, int delay) { - plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, this, delay); + plugin.getFoliaLib().getImpl().runLaterAsync(this, delay, TimeUnit.MILLISECONDS); } public void start() { - plugin.getServer().getScheduler().runTaskAsynchronously(plugin, this); + plugin.getFoliaLib().getImpl().runAsync(this); } private static UUID toUUID(String id) {