diff --git a/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java b/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java index ddd1d40..72925b0 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java @@ -128,7 +128,7 @@ public class CrazyAuctions extends JavaPlugin { TimerTask task = new TimerTask() { @Override public void run() { - getServer().getScheduler().runTask(get(), Methods::updateAuction); + getServer().getGlobalRegionScheduler().run(get(), t -> Methods.updateAuction()); } }; diff --git a/paper/src/main/java/com/badbones69/crazyauctions/controllers/GuiListener.java b/paper/src/main/java/com/badbones69/crazyauctions/controllers/GuiListener.java index 94507c1..f5be85d 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/controllers/GuiListener.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/controllers/GuiListener.java @@ -967,7 +967,7 @@ public class GuiListener implements Listener { inv.setItem(slot, itemBuilder.build()); playClick(player); - Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, runnable, 3 * 20); + player.getScheduler().runDelayed(plugin, task -> runnable.run(), null, 3 * 20); return; } @@ -985,7 +985,7 @@ public class GuiListener implements Listener { inv.setItem(slot, itemBuilder.build()); playClick(player); - Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, runnable, 3 * 20); + player.getScheduler().runDelayed(plugin, task -> runnable.run(), null, 3 * 20); return; } @@ -1002,7 +1002,7 @@ public class GuiListener implements Listener { inv.setItem(slot, itemBuilder.build()); playClick(player); - Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, runnable, 3 * 20); + player.getScheduler().runDelayed(plugin, task -> runnable.run(), null, 3 * 20); return; } diff --git a/paper/src/main/resources/plugin.yml b/paper/src/main/resources/plugin.yml index 16403f7..aadf514 100644 --- a/paper/src/main/resources/plugin.yml +++ b/paper/src/main/resources/plugin.yml @@ -7,6 +7,7 @@ version: '${version}' api-version: '${apiVersion}' description: '${description}' website: '${website}' +folia-supported: true softdepend: [Vault]