My problem here is that I want to shoot an arrow to a nearby entity, so, the location is not permanent and for sure, the arrow direction has to change, I've tried by setting velocity, changing the rotation, trying with invisible armor stands, but nothing, I didn't found the way to do it. I checked a lot of posts, I searched a lot of google, this my latest way to, any idea to do it?
Well, I just got this working by having the following code executed repeatedly by a BukkitScheduler: Code (Text): Location projectileLocation = projectile.getLocation(); Location targetLocation = targetEntity.getLocation(); final int veloX = targetLocation.getBlockX() - projectileLocation.getBlockX(), veloY = targetLocation.getBlockY() - projectileLocation.getBlockY(), veloZ = targetLocation.getBlockZ() - projectileLocation.getBlockZ(); projectile.setVelocity(new Vector(veloX, veloY, veloZ).normalize()); It may need some adjustment but this is the way you can go.