Hey! I want to kill an arrow if it touches the floor or is in a block.. inGround. I know this: PHP: public function deleteArrowOnGround(EntityMotionEvent $event){ if($event->getEntity() instanceof Arrow){ if($event->getEntity()->onGround){ $event->getEntity()->kill(); } } } does not work, because if the arrow is onGround, it doesn't move anymore and the event isn't called anymore. Anyone has a different idea?
Just tried PHP: public function deleteArrowOnGround(ProjectileHitEvent $event){ if($event->getEntity() instanceof Arrow){ $event->getEntity()->kill(); } } it works, but the arrow is lagging hard. PHP: public function deleteArrowOnGround(ProjectileHitEvent $event){ if($event->getEntity() instanceof Arrow){ if($event->getEntity()->onGround || $event->getEntity()->inBlock || $event->getEntity()->isCollided){ $event->getEntity()->kill(); } } } also lags, but not that hard