Expand World.spawnParticle API and add Builder
Adds ability to control who receives it and who is the source/sender (vanish API) the standard API is to send the packet to everyone in the world, which is ineffecient. This adds a new Builder API which is much friendlier to use.
This commit is contained in:
@ -206,6 +206,18 @@ public enum Particle implements Keyed {
|
||||
return key;
|
||||
}
|
||||
|
||||
// Paper start - Particle API expansion
|
||||
/**
|
||||
* Creates a {@link com.destroystokyo.paper.ParticleBuilder}
|
||||
*
|
||||
* @return a {@link com.destroystokyo.paper.ParticleBuilder} for the particle
|
||||
*/
|
||||
@NotNull
|
||||
public com.destroystokyo.paper.ParticleBuilder builder() {
|
||||
return new com.destroystokyo.paper.ParticleBuilder(this);
|
||||
}
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Options which can be applied to dust particles - a particle
|
||||
* color and size.
|
||||
|
||||
Reference in New Issue
Block a user