I'm trying to get the shooting entity on the projectilehitevent. But I'm getting the following error: Code: 2017-06-11 [22:24:38] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\entity\ProjectileHitEvent' to 'T': Undefined property: pocketmine\entity\Arrow::$shootingEntity on \TW\Events 2017-06-11 [22:24:38] [Server thread/CRITICAL]: ErrorException: "Undefined property: pocketmine\entity\Arrow::$shootingEntity" (EXCEPTION) in "/T/src/TW/Events" at line 76 This is line 75 and 76: PHP: public function removeArrow(ProjectileHitEvent $event){$p = $event->getEntity()->shootingEntity; Please help.
Try using $event->getEntity()->getOwningEntity(). It seems like that should be what you need according to this.