Help with arrow on hit explosion!

Discussion in 'Plugin Development' started by Mortal_Wombat, Aug 8, 2014.

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

    Mortal_Wombat

    Hey All! Mortal Here with another question ;P.

    I have been very entertained by messing with my plugin that launches arrows!

    Then i was wondering well how would i go about making an explosion from where it hits!

    Code:java
    1.  
    2. Arrow a = player.launchProjectile(Arrow.class);
    3. a.setFireTicks(40);
    4.  
    5.  
    6.  
    7. a.setVelocity(a.getVelocity().multiply(5));
    8.  
    9. Location impactLocation = a.getLocation();
    10. World w = impactLocation.getWorld();
    11. w.createExplosion (impactLocation, 3);



    And all it does it blow up at the players location! DX

    I realized thats cause it is checking at the time of launch so any help on checking where it lands would be helpful thanks in advance! <3
     
  2. Offline

    Chiller

  3. Offline

    xAstraah

Thread Status:
Not open for further replies.

Share This Page