Change Yaw Of Arrow?

Discussion in 'Spigot Plugin Development' started by DireLegendDev, Jun 9, 2015.

  1. I am trying to change the yaw of an arrow that is show with the launchProjectile event. How can I do this? The code I have below doesn't work :( I am using the EntityBowShootEvent to get the arrow a player shoots. I need to shoot another arrow a little to the right. Can I use yaw to achieve this?

    Code (Text):
    Arrow a = player.launchProjectile(Arrow.class);
                            a.getLocation().setYaw(a.getLocation().getYaw() + 100F);
                            a.setVelocity(player.getLocation().getDirection().multiply(3));
     
  2. Sir, this is why you don't post threads on the forums that can be solved in 24 minutes.