@EventHandler
public void onDamage(EntityDamageByEntityEvent e) {
if (e.getEntity() instanceof Fireball) {
if (e.getDamager() instanceof Player) {
Fireball fireball = (Fireball) e.getEntity();
e.setCancelled(true);
fireball.setDirection(fireball.getDirection());
}
}
}