public final class VibrationData extends ParticleData
ParticleEffect.VIBRATION
particle. The required information is:
The start Location, The destination
and the amount of ticks it will take the
particle to fly this path.
Minecraft only supports full block coordinates for the start and destination location. So any particle will spawn at the center of a block.
ParticleEffect.VIBRATION| Constructor and Description |
|---|
VibrationData(org.bukkit.Location start,
org.bukkit.entity.Entity destination,
int ticks)
Creates a new
VibrationData instance. |
VibrationData(org.bukkit.Location start,
org.bukkit.Location destination,
int ticks)
Creates a new
VibrationData instance. |
| Modifier and Type | Method and Description |
|---|---|
org.bukkit.Location |
getBlockDestination()
Gets the destination
Location of the particle. |
org.bukkit.entity.Entity |
getEntityDestination()
Gets the destination
Entity of the particle. |
org.bukkit.Location |
getStart()
Gets the start
Location of the particle. |
int |
getTicks()
Gets the amount of ticks it will take the particle to travel.
|
Object |
toNMSData()
Creates a new VibrationParticleOption instance with the data of
the current
VibrationData instance. |
getEffect, setEffectpublic VibrationData(org.bukkit.Location start,
org.bukkit.Location destination,
int ticks)
VibrationData instance.start - the start Location of the particle.destination - the destination Location of the particle.ticks - the amount of ticks it will take the particle to reach the blockDestinationpublic VibrationData(org.bukkit.Location start,
org.bukkit.entity.Entity destination,
int ticks)
VibrationData instance.start - the start Location of the particle.destination - the destination Entity of the particle.ticks - the amount of ticks it will take the particle to reach the blockDestinationpublic org.bukkit.Location getStart()
Location of the particle.Location of the particle.public org.bukkit.Location getBlockDestination()
Location of the particle.Location of the particle.public org.bukkit.entity.Entity getEntityDestination()
Entity of the particle.Entity of the particle.public int getTicks()
public Object toNMSData()
VibrationData instance.
Please note that this class is not supported in any versions before 1.17 and could lead to errors if used in legacy versions.
toNMSData in class ParticleDataVibrationData instance.Copyright © 2021. All rights reserved.