Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the default trace of arrows. #102

Open
EseKriper opened this issue Jan 21, 2023 · 0 comments
Open

Remove the default trace of arrows. #102

EseKriper opened this issue Jan 21, 2023 · 0 comments

Comments

@EseKriper
Copy link

EseKriper commented Jan 21, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant