From b2ca364de0462be4d1ae812352d39852e89a9810 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 14 Aug 2018 15:03:15 +0100 Subject: [PATCH] SplashPotion: Don't apply effects to entities which are not alive fixes #2372 --- src/pocketmine/entity/projectile/SplashPotion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/entity/projectile/SplashPotion.php b/src/pocketmine/entity/projectile/SplashPotion.php index 4720a5c28..01b28cd62 100644 --- a/src/pocketmine/entity/projectile/SplashPotion.php +++ b/src/pocketmine/entity/projectile/SplashPotion.php @@ -82,7 +82,7 @@ class SplashPotion extends Throwable{ if($hasEffects){ if(!$this->willLinger()){ foreach($this->level->getNearbyEntities($this->boundingBox->expandedCopy(4.125, 2.125, 4.125), $this) as $entity){ - if($entity instanceof Living){ + if($entity instanceof Living and $entity->isAlive()){ $distanceSquared = $entity->distanceSquared($this); if($distanceSquared > 16){ //4 blocks continue;