return;
}
final Entity damager = damagesource.getEntity();
try {
// Call CraftBukkit event
VehicleDamageEvent event = new VehicleDamageEvent(this.entity.getEntity(), damager, damage);
if (CommonUtil.callEvent(event).isCancelled()) {
return;
}
damage = event.getDamage();
// Play shaking animation and logic
this.entity.setShakingDirection(-this.entity.getShakingDirection());
this.entity.setShakingFactor(10);
this.entity.setVelocityChanged(true);
this.entity.setDamage(this.entity.getDamage() + damage * 10);