I tried the ProjectileHitEvent, the ProjectileHitBlockEvent and the ProjectileHitEntityEvent and the EntityDespawnEvent. None of them worked. How to make exploasive snowballs?
PHP: public function onProjectileHitBlock(ProjectileHitBlockEvent $event){ if($event->getEntity() instanceof Snowball){ $x = $event->getEntity()->getX(); $y = $event->getEntity()->getY(); $z = $event->getEntity()->getZ(); $explosion = new Explosion(new Position($x, $y, $z, $event->getEntity()->getLevel()), 4); $explosion->explodeB(); }}