From 6f5b56d20a355dbb2f69a9e92620b10a4e079cce Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Mon, 25 Mar 2024 22:40:03 +0100 Subject: [PATCH] Fix Folia compatibility by using own ExecutorService (Fixes #587) --- src/main/java/com/Acrobot/ChestShop/ChestShop.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/Acrobot/ChestShop/ChestShop.java b/src/main/java/com/Acrobot/ChestShop/ChestShop.java index 8d999f6..5f96814 100644 --- a/src/main/java/com/Acrobot/ChestShop/ChestShop.java +++ b/src/main/java/com/Acrobot/ChestShop/ChestShop.java @@ -547,7 +547,7 @@ public class ChestShop extends JavaPlugin { getLogger().info("Auto-updater is disabled. If you want the plugin to automatically download new releases then set 'TURN_OFF_UPDATES' to 'false' in your config.yml!"); if (!Properties.TURN_OFF_UPDATE_NOTIFIER) { final Updater updater = new Updater(this, getPluginName().toLowerCase(Locale.ROOT), this.getFile(), Updater.UpdateType.NO_DOWNLOAD, true); - getServer().getScheduler().runTaskAsynchronously(this, () -> { + runInAsyncThread(() -> { if (updater.getResult() == Updater.UpdateResult.UPDATE_AVAILABLE) { getLogger().info("There is a new version available: " + updater.getLatestName() + ". You can download it from https://modrinth.com/plugin/" + getPluginName().toLowerCase(Locale.ROOT)); }