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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user