public class ParticleBuilder extends Object
| Constructor and Description |
|---|
ParticleBuilder(ParticleEffect particle)
Initializes a new
ParticleBuilder |
ParticleBuilder(ParticleEffect particle,
org.bukkit.Location location)
Initializes a new
ParticleBuilder |
| Modifier and Type | Method and Description |
|---|---|
void |
display()
Displays the given particle to all players.
|
void |
display(Collection<? extends org.bukkit.entity.Player> players)
Displays the given particle to all players in the
Collection |
void |
display(org.bukkit.entity.Player... players)
Displays the given particle to the players in the array.
|
void |
display(Predicate<org.bukkit.entity.Player> filter)
Display the given particle to online player that match the given filter.
|
ParticleBuilder |
setAmount(int amount)
Sets the amount.
|
ParticleBuilder |
setColor(Color color)
Sets the color of the particle.
|
ParticleBuilder |
setLocation(org.bukkit.Location location)
Sets the
Location of the particle. |
ParticleBuilder |
setOffset(float offsetX,
float offsetY,
float offsetZ)
Sets the offset.
|
ParticleBuilder |
setOffset(org.bukkit.util.Vector offset)
Sets the offset.
|
ParticleBuilder |
setOffsetX(float offsetX)
Sets the X offset.
|
ParticleBuilder |
setOffsetY(float offsetY)
Sets the Y offset.
|
ParticleBuilder |
setOffsetZ(float offsetZ)
Sets the Z offset.
|
ParticleBuilder |
setParticleData(ParticleData particleData)
Sets the particleData.
|
ParticleBuilder |
setSpeed(float speed)
Sets the speed.
|
Object |
toPacket()
Creates a new
ParticlePacket wit the given values. |
public ParticleBuilder(ParticleEffect particle, org.bukkit.Location location)
ParticleBuilderparticle - The ParticleEffect of the builder.location - The location at which the particle should be displayedpublic ParticleBuilder(ParticleEffect particle)
ParticleBuilderparticle - The ParticleEffect of the builder.public ParticleBuilder setLocation(org.bukkit.Location location)
Location of the particle.location - The new Location of the particle.public ParticleBuilder setOffsetX(float offsetX)
offsetX - The new value of the offsetX fieldpublic ParticleBuilder setOffsetY(float offsetY)
offsetY - The new value of the offsetY fieldpublic ParticleBuilder setOffset(float offsetX, float offsetY, float offsetZ)
public ParticleBuilder setOffset(org.bukkit.util.Vector offset)
offset - a Vector containing the offset values.public ParticleBuilder setOffsetZ(float offsetZ)
offsetZ - The new value of the offsetZ fieldpublic ParticleBuilder setSpeed(float speed)
speed - The new value of the speed fieldpublic ParticleBuilder setAmount(int amount)
amount - The new value of the amount fieldpublic ParticleBuilder setParticleData(ParticleData particleData)
particleData - The new value of the particleData fieldpublic ParticleBuilder setColor(Color color)
PropertyType.COLORABLE PropertyType
to work.color - the Color of the particle.public Object toPacket()
ParticlePacket wit the given values.ParticlePacketIllegalStateException - if the location field isn't set yet.public void display()
public void display(org.bukkit.entity.Player... players)
players - The players that should see the particle.public void display(Predicate<org.bukkit.entity.Player> filter)
filter - a Predicate to filter out
specific Players.public void display(Collection<? extends org.bukkit.entity.Player> players)
Collectionplayers - a list of players that should receive the particle packet.Copyright © 2021. All rights reserved.