Prevent splash potions from hurting other players.

This commit is contained in:
garbagemule
2014-04-23 03:42:17 +02:00
parent b3db962b2a
commit 2e366f4bee
@@ -771,13 +771,11 @@ public class ArenaListener
for (PotionEffect effect : potion.getEffects()) {
PotionEffectType type = effect.getType();
if (type.equals(PotionEffectType.HARM) || type.equals(PotionEffectType.POISON)) {
Set<LivingEntity> players = new HashSet<LivingEntity>();
for (LivingEntity le : event.getAffectedEntities()) {
if (le instanceof Player) {
players.add(le);
event.setIntensity(le, 0.0);
}
}
event.getAffectedEntities().removeAll(players);
break;
}
}