Package xyz.xenondevs.particle.task
Class ParticleTask
java.lang.Object
xyz.xenondevs.particle.task.ParticleTask
- Direct Known Subclasses:
FilteredTask,GlobalTask,SingularTask,SuppliedTask,TargetedTask,WorldTask
A
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.
- Author:
- ByteZ
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParticleTask(List<Object> packets, int tickDelay) Creates a newParticleTask -
Method Summary
Modifier and TypeMethodDescriptionGets the packets that should be sent to the targetPlayers.abstract Collection<org.bukkit.entity.Player>intGets the amount of ticks between each execution
-
Constructor Details
-
ParticleTask
Creates a newParticleTask- Parameters:
packets-Listof packetstickDelay- The delay of ticks between each execution
-
-
Method Details
-
getPackets
Gets the packets that should be sent to the targetPlayers.- Returns:
- the value of the
packetsfield
-
getTickDelay
public int getTickDelay()Gets the amount of ticks between each execution- Returns:
- the value of the
tickDelayfield
-
getTargetPlayers
Returns aCollectionofPlayersthat will receive thepackets. This method has to be implemented by every direct subclass ofParticleTask- Returns:
- A
CollectionofPlayersthat should receive the specifiedpackets
-