Support Folia

This commit is contained in:
Euphyllia Bierque 2024-06-30 18:08:25 +02:00
parent 642ad03b22
commit 76fafacc98
No known key found for this signature in database
GPG Key ID: EF611B23DB2577F1
3 changed files with 5 additions and 4 deletions

View File

@ -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());
}
};

View File

@ -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;
}

View File

@ -7,6 +7,7 @@ version: '${version}'
api-version: '${apiVersion}'
description: '${description}'
website: '${website}'
folia-supported: true
softdepend: [Vault]