Class WorldTask

java.lang.Object
xyz.xenondevs.particle.task.ParticleTask
xyz.xenondevs.particle.task.WorldTask

public final class WorldTask extends ParticleTask
A ParticleTask implementation to send particles to every player in a specific world. This is needed because minecraft doesn't serialize world data into the packet which leads to particles being displayed in every world.
Author:
ByteZ
See Also:
  • Constructor Details

    • WorldTask

      public WorldTask(List<Object> packets, int tickDelay, org.bukkit.World world)
      Creates a new WorldTask.
      Parameters:
      packets - List of packets
      tickDelay - The delay of ticks between each execution
      world - The World in which the particles should be displayed.
  • Method Details

    • getTargetPlayers

      public Collection<org.bukkit.entity.Player> getTargetPlayers()
      Gets all players in the world.
      Specified by:
      getTargetPlayers in class ParticleTask
      Returns:
      all players in the specified world.