From 3028832cd35c53937bb6502f74d3ad53646b12a7 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 20 Oct 2018 16:24:46 +0100 Subject: [PATCH] Entity: remove redundant check from spawnTo() this won't be reached if the player isn't using this chunk anyway. --- src/pocketmine/entity/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 75f193699..9f2389200 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -1952,7 +1952,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{ * @param Player $player */ public function spawnTo(Player $player) : void{ - if(!isset($this->hasSpawned[$player->getLoaderId()]) and $this->chunk !== null and isset($player->usedChunks[Level::chunkHash($this->chunk->getX(), $this->chunk->getZ())])){ + if(!isset($this->hasSpawned[$player->getLoaderId()])){ $this->hasSpawned[$player->getLoaderId()] = $player; $this->sendSpawnPacket($player);