public final class TaskManager extends Object
ParticleTasksParticleTask| Modifier and Type | Method and Description |
|---|---|
static TaskManager |
getTaskManager()
Get the singleton instance of the
TaskManager |
static int |
startFilteredTask(List<Object> packets,
int tickDelay,
Predicate<org.bukkit.entity.Player> filter)
Starts a new
FilteredTask. |
static int |
startGlobalTask(List<Object> packets,
int tickDelay)
Starts a new
GlobalTask. |
static int |
startSingularTask(List<Object> packets,
int tickDelay,
org.bukkit.entity.Player target)
Starts a new
SingularTask. |
static int |
startSingularTask(List<Object> packets,
int tickDelay,
UUID target)
Starts a new
SingularTask. |
static int |
startSuppliedTask(List<Object> packets,
int tickDelay,
Supplier<Collection<org.bukkit.entity.Player>> supplier)
Starts a new
SuppliedTask. |
static int |
startTargetedTask(List<Object> packets,
int tickDelay,
Collection<org.bukkit.entity.Player> targets)
Starts a new
TargetedTask. |
int |
startTask(ParticleTask task)
Starts a new Timer for the given task.
|
static int |
startWorldTask(List<Object> packets,
int tickDelay,
org.bukkit.World world)
Starts a new
WorldTask. |
void |
stopTask(int taskId)
Stops a task that is currently running.
|
public int startTask(ParticleTask task)
task - the task that should be added to the schedulerstopTask(int)stopTask(int)public void stopTask(int taskId)
taskId - the id of the task to be stopped.public static TaskManager getTaskManager()
TaskManagerTaskManagerpublic static int startGlobalTask(List<Object> packets, int tickDelay)
GlobalTask.packets - List of packetstickDelay - The delay of ticks between each executionstopTask(int)GlobalTask,
stopTask(int)public static int startWorldTask(List<Object> packets, int tickDelay, org.bukkit.World world)
WorldTask.packets - List of packetstickDelay - The delay of ticks between each executionworld - The target WorldstopTask(int)WorldTask,
stopTask(int)public static int startTargetedTask(List<Object> packets, int tickDelay, Collection<org.bukkit.entity.Player> targets)
TargetedTask.packets - List of packetstickDelay - The delay of ticks between each executiontargets - A Collection of Players that will receive the particles.stopTask(int)TargetedTask,
stopTask(int)public static int startSingularTask(List<Object> packets, int tickDelay, UUID target)
SingularTask.packets - List of packetstickDelay - The delay of ticks between each executiontarget - The UUID of the target PlayerstopTask(int)SingularTask,
stopTask(int)public static int startSingularTask(List<Object> packets, int tickDelay, org.bukkit.entity.Player target)
SingularTask.packets - List of packetstickDelay - The delay of ticks between each executiontarget - The target PlayerstopTask(int)SingularTask,
stopTask(int)public static int startFilteredTask(List<Object> packets, int tickDelay, Predicate<org.bukkit.entity.Player> filter)
FilteredTask.packets - List of packetstickDelay - The delay of ticks between each executionfilter - The Predicate to filter the PlayersstopTask(int)FilteredTask,
stopTask(int)public static int startSuppliedTask(List<Object> packets, int tickDelay, Supplier<Collection<org.bukkit.entity.Player>> supplier)
SuppliedTask.packets - List of packetstickDelay - The delay of ticks between each executionsupplier - The Supplier used to retrieve the Collection of target PlayersstopTask(int)SuppliedTask,
stopTask(int)Copyright © 2021. All rights reserved.