Rosewood-Development / PlayerParticles

The PlayerParticles plugin made by Esophose
Other
173 stars 49 forks source link

Add API Method for providing Dust Color #78

Closed thisisfel1x closed 3 years ago

thisisfel1x commented 3 years ago

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")); Result

Solution: Something like PlayerParticlesAPI.getInstance().addActivePlayerParticle(player, ParticleEffect.DUST, ParticleStyle.fromName("halo"), OrdinaryColor.fromRGB(...) would be great

Would be great to see this in the API! Best regards

Esophose commented 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.

Esophose commented 3 years ago

In addition to that, you can get the styles from DefaultStyles.HALO instead of looking them up by name

HexedHero commented 3 years ago

Doing PlayerParticlesAPI.getInstance().addActivePlayerParticle(event.getPlayer(), ParticleEffect.DUST, ParticleStyle.fromName("halo"), new OrdinaryColor(97, 33, 37)); works for me.

thisisfel1x commented 3 years ago

Sorry guys, I'm dump. Just checked OrdinaryColor.SOMETHING and not new OrdinaryColor(...) Solved, thanks for your help :)