Package com.shanebeestudios.coreapi.util
Class TaskUtils
java.lang.Object
com.shanebeestudios.coreapi.util.TaskUtils
Shortcut methods for running tasks
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidInitialize this util with a Pluginstatic voidrunTaskEndOfTick(Runnable runnable) Run a task at the end of the current tickstatic voidrunTaskEndOfTickAsynchronously(Runnable runnable) Run a task at the end of the current tick asyncstatic voidrunTaskLater(Runnable runnable, long delay) Run a task laterstatic voidrunTaskLaterAsynchronously(Runnable runnable, long delay) Run a task later asyncstatic voidrunTaskTimer(Runnable runnable, long delay, long period) Run a task timerstatic voidrunTaskTimerAsynchronously(Runnable runnable, long delay, long period) Run a task timer async
-
Method Details
-
init
Initialize this util with a Plugin- Parameters:
plugin- Plugin used in schedulers
-
runTaskEndOfTick
Run a task at the end of the current tick- Parameters:
runnable- Task to run
-
runTaskEndOfTickAsynchronously
Run a task at the end of the current tick async- Parameters:
runnable- Task to run
-
runTaskLater
Run a task later- Parameters:
runnable- Task to rundelay- Delay in ticks before task runs
-
runTaskLaterAsynchronously
Run a task later async- Parameters:
runnable- Task to rundelay- Delay in ticks before task runs
-
runTaskTimer
Run a task timer- Parameters:
runnable- Task to rundelay- Delay in ticks before task runsperiod- Period in ticks how often task runs
-
runTaskTimerAsynchronously
Run a task timer async- Parameters:
runnable- Task to rundelay- Delay in ticks before task runsperiod- Period in ticks how often task runs
-