public class ParticleBuilder extends Object
| Constructor and Description |
|---|
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(java.util.function.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 |
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 setOffsetX(float offsetX)
offsetX - The new value of the offsetX fieldpublic ParticleBuilder setOffsetY(float offsetY)
offsetY - The new value of the offsetY fieldpublic 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.ParticlePacketpublic void display()
public void display(org.bukkit.entity.Player... players)
players - The players that should see the particle.public void display(java.util.function.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 © 2020. All rights reserved.