Package cc.carm.plugin.userprefix.folia
Class FoliaScheduler
- java.lang.Object
-
- cc.carm.plugin.userprefix.folia.FoliaScheduler
-
public class FoliaScheduler extends Object
-
-
Constructor Summary
Constructors Constructor Description FoliaScheduler(Main plugin, boolean folia)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
runAsync(Runnable task)
void
runGlobal(boolean forceSync, Runnable task)
Folia 上在全局调度器上执行任务,或在 Bukkit 上同步执行任务void
runOnEntity(Entity entity, boolean forceSync, Runnable task)
Folia 上在实体所在的调度器上执行任务,或在 Bukkit 上同步执行任务
-
-
-
Constructor Detail
-
FoliaScheduler
public FoliaScheduler(Main plugin, boolean folia)
-
-
Method Detail
-
runAsync
public void runAsync(Runnable task)
-
runOnEntity
public void runOnEntity(Entity entity, boolean forceSync, Runnable task)
Folia 上在实体所在的调度器上执行任务,或在 Bukkit 上同步执行任务- Parameters:
entity
- 实体forceSync
- 若为 true,Bukkit 下强制同步运行;若为 false,Bukkit 下直接执行task
- 任务- See Also:
runBukkit(boolean, Runnable)
,runOnEntityFolia(Entity, Runnable)
-
runGlobal
public void runGlobal(boolean forceSync, Runnable task)
Folia 上在全局调度器上执行任务,或在 Bukkit 上同步执行任务- Parameters:
forceSync
- 若为 true,Bukkit 下强制同步运行;若为 false,Bukkit 下直接执行task
- 任务- See Also:
runBukkit(boolean, Runnable)
,runGlobalFolia(Runnable)
-
-