From 3b7ece336350b535f8abfa27aaea285df4ca2d70 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 7 Oct 2014 09:24:19 +0200 Subject: [PATCH] Do not spawn dead entities to players, fixes #2157, possible fix for #2165 --- src/pocketmine/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 1af2f65ec..8c2597e98 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -564,7 +564,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ Level::getXZ($index, $X, $Z); foreach($this->getLevel()->getChunkEntities($X, $Z) as $entity){ - if($entity !== $this){ + if($entity !== $this and !$entity->closed and !$entity->dead){ $entity->spawnTo($this); } }