Class ParticleTask

java.lang.Object
xyz.xenondevs.particle.task.ParticleTask
Direct Known Subclasses:
FilteredTask, GlobalTask, SingularTask, SuppliedTask, TargetedTask, WorldTask

public abstract class ParticleTask extends Object
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 Details

    • ParticleTask

      public ParticleTask(List<Object> packets, int tickDelay)
      Creates a new ParticleTask
      Parameters:
      packets - List of packets
      tickDelay - The delay of ticks between each execution
  • Method Details

    • getPackets

      public List<Object> getPackets()
      Gets the packets that should be sent to the target Players.
      Returns:
      the value of the packets field
    • getTickDelay

      public int getTickDelay()
      Gets the amount of ticks between each execution
      Returns:
      the value of the tickDelay field
    • getTargetPlayers

      public abstract Collection<org.bukkit.entity.Player> getTargetPlayers()
      Returns a Collection of Players that will receive the packets. This method has to be implemented by every direct subclass of ParticleTask
      Returns:
      A Collection of Players that should receive the specified packets