pocketmine\level\Level::close PHP Method

close() public method

public close ( )
    public function close()
    {
        if ($this->getAutoSave()) {
            $this->save();
        }
        foreach ($this->chunks as $chunk) {
            $this->unloadChunk($chunk->getX(), $chunk->getZ(), false);
        }
        $this->unregisterGenerator();
        $this->provider->close();
        $this->provider = null;
        $this->blockMetadata = null;
        $this->blockCache = [];
        $this->temporalPosition = null;
    }
Level