i have this simple code in a Listener class.
@EventHandler(priority=EventPriority.HIGH)
public void onProjectileHit(ProjectileHitEvent event) {
if (event.isCancelled()) return;
if (event.getHitEntity() == null) return;
getLogger().info(event.getHitEntity().getVelocity().toString());
event.getHitEntity().setVelocity(new Vector(0, 4, 0));
getLogger().info(event.getHitEntity().getVelocity().toString());
}
when i shoot a stationary mob nothing happens to it, but when i shoot a mob that's falling or jumping up a block it gets launched into the sky. any advice?
(2nd logger statement outputs a y velocity of 4.0 even when the mob doesn't move)