Closed thisisfel1x closed 3 years ago
Eh? new OrdinaryColor(r, g, b)
Did you want one that took an rgb value itself? In that case you can do new java.awt.Color(rgb)
and get the individual r, b, and b values from that.
In addition to that, you can get the styles from DefaultStyles.HALO
instead of looking them up by name
Doing
PlayerParticlesAPI.getInstance().addActivePlayerParticle(event.getPlayer(), ParticleEffect.DUST, ParticleStyle.fromName("halo"), new OrdinaryColor(97, 33, 37));
works for me.
Sorry guys, I'm dump. Just checked OrdinaryColor.SOMETHING
and not new OrdinaryColor(...)
Solved, thanks for your help :)
After looking into the API, I couldn't find any way to assign a rgb value to a dust particle effect.
Example:
PlayerParticlesAPI.getInstance().addActivePlayerParticle(player, ParticleEffect.DUST, ParticleStyle.fromName("halo"));
ResultSolution: Something like
PlayerParticlesAPI.getInstance().addActivePlayerParticle(player, ParticleEffect.DUST, ParticleStyle.fromName("halo"), OrdinaryColor.fromRGB(...)
would be greatWould be great to see this in the API! Best regards