View difference between Paste ID: nkJUupnL and rq9QEuv1
SHOW: | | - or go back to the newest paste.
1
@EventHandler
2
public void onDamage(PotionSplashEvent evt) {
3
	Material mat = evt.getPotion().getItem().getData().getItemType();
4
	byte id1     = evt.getPotion().getItem().getData().getData();
5
	byte id2     = evt.getPotion().getItem().getData().getData();
6
7
	if (mat == Material.POTION) {
8
		if (id1 == 32732 || id2 == 32764) {
9-
			//blaaa
9+
			for (LivingEntity le : evt.getAffectedEntities()) {
10
				if (instanceof le == Player) {
11
					Player p = (Player) le;
12
					// ... 
13
				}
14
			}
15
		}
16
	}
17
}