Added world compression

This commit is contained in:
Shoghi Cervantes Pueyo
2013-01-04 12:51:33 +01:00
parent 3ba8662c2c
commit 3e9afbdf54
4 changed files with 26 additions and 7 deletions

View File

@@ -142,7 +142,7 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run
}
$this->server->mapName = $this->getProperty("level-name");
$this->server->mapDir = FILE_PATH."worlds/".$this->server->mapName."/";
if($this->server->mapName === false or trim($this->server->mapName) === "" or !file_exists($this->server->mapDir."chunks.dat")){
if($this->server->mapName === false or trim($this->server->mapName) === "" or (!file_exists($this->server->mapDir."chunks.dat") and !file_exists($this->server->mapDir."chunks.dat.gz"))){
if($this->server->mapName === false or trim($this->server->mapName) === ""){
$this->server->mapName = "world";
}