Arrow Particle

Discussion in 'Plugin Development' started by iWareWolf, Jun 15, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    iWareWolf

    Code:
            final Arrow arrow = player.shootArrow();
            arrow.setKnockbackStrength(7);
            arrow.setVelocity(arrow.getVelocity().multiply(4));
            arrow.setMetadata("GaleWinds", new FixedMetadataValue(heroes, ""));
            int i = Bukkit.getScheduler().scheduleSyncRepeatingTask(heroes, new Runnable() {
     
                @Override
                public void run() {
                    if (arrow != null) {
                        arrow.getWorld().playEffect(arrow.getLocation(), Effect.CLOUD, 0, 0);
                    } else {
     
                    }
                }
     
            }, 0, 1);
    I want to make a particle trail for my arrow but it is not working.
     
  2. Offline

    Quantum64

    void playEffect (Location location, Effect effect, int data, int radius)
    Perhaps a effect radius of 0 is not a wise idea.
     
    AoH_Ruthless likes this.
  3. Offline

    iWareWolf

    Quantum64

    Thanks how can I cancel this when the arrow is gone?
     
  4. Offline

    SuppaTim

    As you set it's metadata you could check if the arrow has the metadata upon hit and cancel the timer
     
Thread Status:
Not open for further replies.

Share This Page