Skip to content

Instantly share code, notes, and snippets.

@Dinner1111
Last active December 28, 2015 01:39
Show Gist options
  • Save Dinner1111/7421709 to your computer and use it in GitHub Desktop.
Save Dinner1111/7421709 to your computer and use it in GitHub Desktop.
@EventHandler
public void listen(EntityDamageEvent e) {
if (e.getEntityType().equals(EntityType.SNOWBALL)) {
Player p = (Player) e.getEntity();
PotionEffect poteff = new PotionEffect(PotionEffectType.SLOW, 1, 100);
p.addPotionEffect(poteff);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment