9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-28 03:19:15 +00:00

make the chunks tick on region threads

This commit is contained in:
XiaoMoMi
2024-03-25 02:28:40 +08:00
parent 9be0d87c3f
commit 64589c3503
8 changed files with 49 additions and 8 deletions

View File

@@ -18,6 +18,7 @@
package net.momirealms.customcrops.api.scheduler;
import org.bukkit.Location;
import org.bukkit.World;
import java.util.concurrent.TimeUnit;
@@ -31,6 +32,16 @@ public interface Scheduler {
*/
void runTaskSync(Runnable runnable, Location location);
/**
* Runs a task synchronously on the main server thread or region thread.
*
* @param runnable The task to run.
* @param world world
* @param x chunk X
* @param z chunk Z
*/
void runTaskSync(Runnable runnable, World world, int x, int z);
/**
* Runs a task synchronously with a specified delay and period.
*