Interface ParticleTypeVibration
Class used to represent vibration particle type since MC 1.19.
It provides a non-reflective flyingTo method overloads
to construct ParticleType with selected target and flying time.
All flyingTo methods does not validate parameters in any way.
IMPORTANT NOTE: All methods annotated with Shared annotation
caches and returns exactly one and the same instance with changed state between method calls.
For an independent copy of returned instances, check detachCopy methods on them.
-
Method Summary
Modifier and TypeMethodDescriptionflyingTo(double targetX, double targetY, double targetZ, int ticks) Selects target position and flying time this particle should get.flyingTo(org.bukkit.entity.Entity targetEntity, int ticks) Selects target position and flying time this particle should get.flyingTo(org.bukkit.Location target, int ticks) Selects target position and flying time this particle should get.flyingTo(org.bukkit.util.Vector target, int ticks) Selects target position and flying time this particle should get.booleanChecks if this particle is supported by this Spigot version.
-
Method Details
-
flyingTo
Selects target position and flying time this particle should get.
Currently, positions are aligned to block centers.
Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
target- aLocationcontaining target position.ticks- flight duration (in ticks).- Returns:
- a valid shared
ParticleTypeobject with selected target and flying time. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
flyingTo
Selects target position and flying time this particle should get.
Currently, positions are aligned to block centers.
Parameters are not validated in any way.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
target- aVectorcontaining target position.ticks- flight duration (in ticks).- Returns:
- a valid shared
ParticleTypeobject with selected target and flying time. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
flyingTo
Selects target position and flying time this particle should get.
Currently, positions are aligned to block centers.
Parameters are not validated in any way.
This method is overridden by dynamically generated subclasses.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
targetX- component of a target position.targetY- component of a target position.targetZ- component of a target position.ticks- flight duration (in ticks).- Returns:
- a valid shared
ParticleTypeobject with selected target and flying time. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
flyingTo
Selects target position and flying time this particle should get.
Currently, positions are aligned to block centers.
Parameters are not validated in any way.
This method is overridden by dynamically generated subclasses.
It is wise to check, if particle is supported by current Spigot version using
isPresent()method.- Parameters:
targetEntity- anEntitythis particle should fly to.ticks- flight duration (in ticks).- Returns:
- a valid shared
ParticleTypeobject with selected target entity and flying time. - Throws:
ParticleException- when requested particle type is not supported by this server version.
-
isPresent
boolean isPresent()Checks if this particle is supported by this Spigot version.
This method is overridden by dynamically generated subclasses.
- Returns:
- true if this particle is supported by this Spigot version, false otherwise.
-