playEffect

Discussion in 'Spigot Plugin Development' started by TheFuzzyHead5, Aug 12, 2018.

  1. Ello,

    So I'm looking into particles, and the parameters for playEffect are:

    Code (Text):
    e.getPlayer().spigot().playEffect(location, effect, id, data, offsetX, offsetY, offsetZ, speed, particleCount, radius);    
    I can't seem to find the javadoc information that matches this, though I think it'd be pretty useless anyway as their descriptions aren't too good.

    I'm wondering, what is the purpose of 'id', 'data' and 'radius'?

    Cheers
     
  2. #playEffect is deprecated because of magic values.
    Use #spawnParticle instead.
    The parameters are described well for #spawnParticle.
    The additional data is relevant for customizable particles as listed here: https://wiki.vg/Protocol#Particle.
    You also need to know, for colorable particles, speed and count must be zero, then the offset will be interpreted as RGB value.
     
  3. Much appreciated brother.
     

Share This Page