public final class ParticlePacket extends Object
| Constructor and Description |
|---|
ParticlePacket(ParticleEffect particle,
float offsetX,
float offsetY,
float offsetZ,
float speed,
int amount)
Creates a new
ParticlePacket that can be sent to one or multiple
players. |
ParticlePacket(ParticleEffect particle,
float offsetX,
float offsetY,
float offsetZ,
float speed,
int amount,
ParticleData particleData)
Creates a new
ParticlePacket that can be sent to one or multiple
players. |
| Modifier and Type | Method and Description |
|---|---|
Object |
createPacket(org.bukkit.Location location)
Creates a NMS PacketPlayOutWorldParticles packet with the data in the current
ParticlePacket data. |
int |
getAmount()
Gets how many particles will be shown by the client.
|
float |
getOffsetX()
Gets the offsetX value of the particle.
|
float |
getOffsetY()
Gets the offsetY value of the particle.
|
float |
getOffsetZ()
Gets the offsetZ value of the particle.
|
ParticleEffect |
getParticle()
Gets the
ParticleEffect that will be displayed by the client. |
ParticleData |
getParticleData()
Gets the
ParticleData that should be used when displaying the
particle. |
float |
getSpeed()
Gets the speed at which the particle will fly off.
|
public ParticlePacket(ParticleEffect particle, float offsetX, float offsetY, float offsetZ, float speed, int amount, ParticleData particleData)
ParticlePacket that can be sent to one or multiple
players.particle - the ParticleEffect that should be sent.offsetX - the offsetX or extra data the particle should have.offsetY - the offsetY or extra data the particle should have.offsetZ - the offsetZ or extra data the particle should have.speed - the multiplier of the velocity.amount - the amount of particles that should be spawned.particleData - the ParticleData of the particleparticle,
offsetX,
offsetY,
offsetZ,
speed,
amount,
particleData,
ParticleDatapublic ParticlePacket(ParticleEffect particle, float offsetX, float offsetY, float offsetZ, float speed, int amount)
ParticlePacket that can be sent to one or multiple
players.particle - the ParticleEffect that should be sent.offsetX - the offsetX or extra data the particle should have.offsetY - the offsetY or extra data the particle should have.offsetZ - the offsetZ or extra data the particle should have.speed - the multiplier of the velocity.amount - the amount of particles that should be spawned.particle,
offsetX,
offsetY,
offsetZ,
speed,
amountpublic ParticleEffect getParticle()
ParticleEffect that will be displayed by the client.ParticleEffect which should be displayed by the client.public float getOffsetX()
public float getOffsetY()
public float getOffsetZ()
public float getSpeed()
public int getAmount()
public ParticleData getParticleData()
ParticleData that should be used when displaying the
particle.ParticleData that will be used.public Object createPacket(org.bukkit.Location location)
ParticlePacket data.location - the Location the particle should be displayed at.null when something goes wrong.Copyright © 2021. All rights reserved.