java.lang.Object
com.destroystokyo.paper.ParticleBuilder
org.skriptlang.skript.bukkit.particles.particleeffects.ParticleEffect
org.skriptlang.skript.bukkit.particles.particleeffects.DirectionalEffect
All Implemented Interfaces:
Debuggable, Cloneable

public class DirectionalEffect extends ParticleEffect
A particle effect where particles have a specific direction of travel/velocity. Allows getting and setting the velocity of the particles. Setting the velocity will set the count to 0. Velocity is only applied if the count is 0.
  • Constructor Details

    • DirectionalEffect

      @Internal public DirectionalEffect(org.bukkit.Particle particle)
      Internal constructor. Use ParticleEffect.of(Particle) instead.
      Parameters:
      particle - The particle type
  • Method Details

    • hasVelocity

      public boolean hasVelocity()
      Checks if the effect will use the offset as velocity. Velocity is only applied if the count is 0.
      Returns:
      true if the effect will use the offset as velocity, false otherwise
    • velocity

      public org.joml.Vector3d velocity()
      Alias for ParticleEffect.offset() when the effect is directional. Prefer using this method when dealing with directional effects that have count = 0.
      Returns:
      the velocity vector
    • velocity

      public DirectionalEffect velocity(org.joml.Vector3d velocity)
      Sets the velocity of the particles by setting the offset and count. This will set the count to 0 to ensure the velocity is applied.
      Parameters:
      velocity - the velocity vector
      Returns:
      this effect for chaining
    • copy

      public DirectionalEffect copy()
      Overrides:
      copy in class ParticleEffect
      Returns:
      a copy of this directional effect