Rosewood-Development / PlayerParticles

The PlayerParticles plugin made by Esophose
Other
170 stars 48 forks source link

Remove the default trace of arrows. #102

Open EseKriper opened 1 year ago

EseKriper commented 1 year ago

It is a good idea to remove the default particle from the arrows.

You can do it with something like this:

public void on(final ProjectileLaunchEvent event) { final Projectile entity = event.getEntity(); if (!(entity instanceof Arrow)) { return; } final Arrow arrow = (Arrow)entity; final ProjectileSource shooter = arrow.getShooter(); if (shooter instanceof Player) { final Player player = (Player)shooter; final Particle effect = this.trails.getParticle(player); if (this.plugin.getConfig().getBoolean("remove-default-trail")) { arrow.setCritical(false); } if (effect != null) { arrow.setCritical(false); new ArrowTrailRunnable(this.plugin, arrow, effect); } } }

It looks ugly to have 2 particles on the same arrow.