EntityDamageByChildEntityEvent
Extends EntityDamageByEntityEvent
Called when an entity takes damage from an entity sourced from another entity, for example being hit by a snowball thrown by a Player.
Methods
__construct()
php
public function __construct(\pocketmine\entity\Entity $damager, \pocketmine\entity\Entity $childEntity, \pocketmine\entity\Entity $entity, int $cause, float $damage, array $modifiers = [])getChild()
php
public function getChild() : ?\pocketmine\entity\EntityReturns the entity which caused the damage, or null if the entity has been killed or closed.
