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

public class ScalableEffect extends ParticleEffect
A particle effect that can be scaled. Currently used for `sweep attack` and `explosion` particles.
  • Constructor Details

    • ScalableEffect

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

    • hasScale

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

      public ParticleEffect scale(double scale)
      Sets the scale of the particles by setting the offset and count. This will set the count to 0 to ensure the scale is applied.
      Parameters:
      scale - the scale value
      Returns:
      this effect for chaining
    • scale

      public double scale()
      Gets the current scale of the particles.
      Returns:
      the scale value
    • copy

      public ScalableEffect copy()
      Overrides:
      copy in class ParticleEffect
      Returns:
      a copy of this scalable effect