Class ParticleUtils

java.lang.Object
org.skriptlang.skript.bukkit.particles.ParticleUtils

public class ParticleUtils extends Object
Utility class for working with Bukkit Particles and their behaviors. Currently used for categorizing particles based on shared characteristics.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Unmodifiable @NotNull Collection<org.bukkit.Particle>
    Gets an unmodifiable collection of all converging particles.
    static @Unmodifiable @NotNull Collection<org.bukkit.Particle>
    Gets an unmodifiable collection of all directional particles.
    static @Unmodifiable @NotNull Collection<org.bukkit.Particle>
    Gets an unmodifiable collection of all rising particles.
    static @Unmodifiable @NotNull Collection<org.bukkit.Particle>
    Gets an unmodifiable collection of all scalable particles.
    static boolean
    isConverging(@NotNull org.bukkit.Particle particle)
    Checks if the given particle is converging.
    static boolean
    isDirectional(@NotNull org.bukkit.Particle particle)
    Checks if the given particle is directional, i.e.
    static boolean
    isRising(@NotNull org.bukkit.Particle particle)
    Checks if the given particle is rising.
    static boolean
    isScalable(@NotNull org.bukkit.Particle particle)
    Checks if the given particle is scalable, i.e.
    static boolean
    usesVelocity(@NotNull org.bukkit.Particle particle)
    Checks if the given particle uses velocity, i.e.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ParticleUtils

      public ParticleUtils()
  • Method Details

    • isDirectional

      public static boolean isDirectional(@NotNull @NotNull org.bukkit.Particle particle)
      Checks if the given particle is directional, i.e. offset will be treated as a direction/velocity vector if count is 0.
      Parameters:
      particle - the particle to check
      Returns:
      true if the particle is directional, false otherwise
    • isConverging

      public static boolean isConverging(@NotNull @NotNull org.bukkit.Particle particle)
      Checks if the given particle is converging. These particles spawn away from a point based on offset, then move towards it.
      Parameters:
      particle - the particle to check
      Returns:
      true if the particle is converging, false otherwise
    • isRising

      public static boolean isRising(@NotNull @NotNull org.bukkit.Particle particle)
      Checks if the given particle is rising. These particles are directional, but have an overriding upward motion.
      Parameters:
      particle - the particle to check
      Returns:
      true if the particle is rising, false otherwise
    • isScalable

      public static boolean isScalable(@NotNull @NotNull org.bukkit.Particle particle)
      Checks if the given particle is scalable, i.e. offset is used to scale the particle size.
      Parameters:
      particle - the particle to check
      Returns:
      true if the particle is scalable, false otherwise
    • usesVelocity

      public static boolean usesVelocity(@NotNull @NotNull org.bukkit.Particle particle)
      Checks if the given particle uses velocity, i.e. is either directional or rising.
      Parameters:
      particle - the particle to check
      Returns:
      true if the particle uses velocity, false otherwise
    • getDirectionalParticles

      @NotNull public static @Unmodifiable @NotNull Collection<org.bukkit.Particle> getDirectionalParticles()
      Gets an unmodifiable collection of all directional particles.
      Returns:
      the collection of directional particles
      See Also:
    • getConvergingParticles

      @NotNull public static @Unmodifiable @NotNull Collection<org.bukkit.Particle> getConvergingParticles()
      Gets an unmodifiable collection of all converging particles.
      Returns:
      the collection of converging particles
      See Also:
    • getRisingParticles

      @NotNull public static @Unmodifiable @NotNull Collection<org.bukkit.Particle> getRisingParticles()
      Gets an unmodifiable collection of all rising particles.
      Returns:
      the collection of rising particles
      See Also:
    • getScalableParticles

      @NotNull public static @Unmodifiable @NotNull Collection<org.bukkit.Particle> getScalableParticles()
      Gets an unmodifiable collection of all scalable particles.
      Returns:
      the collection of scalable particles
      See Also: