public abstract class ParticleTask extends Object
ParticleTask is a repeating task that sends
a List of packets to target Players
with a custom tickDelay. The implementations
of this class support different ways of retrieving the
list of targeted Players. Custom implementations
of this class are encouraged if none of the built-in tasks match.
A more in depth explanation can be found on the Wiki
This class holds the basic information needed by the
TaskManager.
GlobalTask,
TargetedTask,
SingularTask,
FilteredTask,
SuppliedTask,
WorldTask| Constructor and Description |
|---|
ParticleTask(List<Object> packets,
int tickDelay)
Creates a new
ParticleTask |
| Modifier and Type | Method and Description |
|---|---|
List<Object> |
getPackets()
Gets the packets that should be sent to the target
Players. |
abstract Collection<org.bukkit.entity.Player> |
getTargetPlayers()
|
int |
getTickDelay()
Gets the amount of ticks between each execution
|
public ParticleTask(List<Object> packets, int tickDelay)
ParticleTaskpackets - List of packetstickDelay - The delay of ticks between each executionpublic List<Object> getPackets()
Players.packets fieldpublic int getTickDelay()
tickDelay fieldpublic abstract Collection<org.bukkit.entity.Player> getTargetPlayers()
Collection of Players
that will receive the packets. This method
has to be implemented by every direct subclass of
ParticleTaskCollection of Players that should receive the specified packetsCopyright © 2021. All rights reserved.