Merge pull request #179 from Euphillya/feature/folia

Support Folia
This commit is contained in:
Ryder Belserion 2024-06-30 16:43:35 -04:00 committed by GitHub
commit 957ff8e4fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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]