Class ParticleUtils
java.lang.Object
org.skriptlang.skript.bukkit.particles.ParticleUtils
Utility class for working with Bukkit Particles and their behaviors.
Currently used for categorizing particles based on shared characteristics.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @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 booleanisConverging(@NotNull org.bukkit.Particle particle) Checks if the given particle is converging.static booleanisDirectional(@NotNull org.bukkit.Particle particle) Checks if the given particle is directional, i.e.static booleanisRising(@NotNull org.bukkit.Particle particle) Checks if the given particle is rising.static booleanisScalable(@NotNull org.bukkit.Particle particle) Checks if the given particle is scalable, i.e.static booleanusesVelocity(@NotNull org.bukkit.Particle particle) Checks if the given particle uses velocity, i.e.
-
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
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:
-