entitydamageevent and check the cause. If it is a arrow then setcancelled then give the hurter damage your self.
No. PHP: public function onHitByArrow(EntityDamageEvent $event){ if($event->getCause() === 2){ $event->setCancelled(true); $event->getEntity()->attack(WHAT EVER HERE); }}
PHP: If($event instanceof EntityDamageByChildEntityEvent and $event->getChild() instanceof Arrow) { $event->setDamage($new_damage);}