@EventHandler(priority=EventPriority.NORMAL)
public void onProjectileHit(ProjectileHitEvent e) {
Projectile projectile = e.getEntity();
if (projectile.getType().equals(EntityType.SNOWBALL)) {
Entity possibleTarget = (Entity)projectile.getNearbyEntities(1.0D, 1.0D, 1.0D).get(0);
if ((possibleTarget instanceof Player)) {
Player target = (Player)possibleTarget;
target.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 2, 2));
}
}
}
}
Ehm kannst du mir das fertig schreiben als Plugin ich habs nicht so mit dem Programmieren