Class DirectionalEffect
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
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleanChecks if the effect will use the offset as velocity.org.joml.Vector3dvelocity()Alias forParticleEffect.offset()when the effect is directional.velocity(org.joml.Vector3d velocity) Sets the velocity of the particles by setting the offset and count.Methods inherited from class org.skriptlang.skript.bukkit.particles.particleeffects.ParticleEffect
acceptsData, allPlayers, count, data, dataType, distribution, distribution, extra, force, getAllNamesWithoutData, isUsingNormalDistribution, location, location, of, of, offset, offset, offset, parse, particle, receivers, receivers, receivers, receivers, receivers, receivers, receivers, receivers, receivers, receivers, source, spawn, spawn, toString, toString, toStringMethods inherited from class com.destroystokyo.paper.ParticleBuilder
clone, color, color, color, color, color, colorTransition, colorTransition, colorTransition, colorTransition, count, data, extra, force, hasReceivers, location, offsetX, offsetY, offsetZ, particle, receivers, source
-
Constructor Details
-
DirectionalEffect
@Internal public DirectionalEffect(org.bukkit.Particle particle) Internal constructor. UseParticleEffect.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 forParticleEffect.offset()when the effect is directional. Prefer using this method when dealing with directional effects that have count = 0.- Returns:
- the velocity vector
-
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
- Overrides:
copyin classParticleEffect- Returns:
- a copy of this directional effect
-