public function spawnTo(Player $player) { if (!isset($this->hasSpawned[$player->getLoaderId()]) and isset($player->usedChunks[Level::chunkHash($this->chunk->getX(), $this->chunk->getZ())])) { $this->hasSpawned[$player->getLoaderId()] = $player; } }
public function spawnTo(Player $player) { $pk = $this->addEntityDataPacket($player); $pk->type = self::NETWORK_ID; $player->dataPacket($pk); parent::spawnTo($player); }