From 44546fd11d8b8561e29020e593cfa5604a84cd06 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sun, 23 Dec 2012 21:11:45 +0100 Subject: [PATCH] Do not overwrite worlds and use level-name property --- classes/API/ServerAPI.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/API/ServerAPI.php b/classes/API/ServerAPI.php index 7931fc76..5689619c 100644 --- a/classes/API/ServerAPI.php +++ b/classes/API/ServerAPI.php @@ -120,7 +120,9 @@ 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."data/maps/".$this->server->mapName."/"; if($this->server->mapName === false or trim($this->server->mapName) === "" or !file_exists($this->server->mapDir."chunks.dat")){ - $this->server->mapName = "world"; + if($this->server->mapName === false or trim($this->server->mapName) === ""){ + $this->server->mapName = "world"; + } $this->server->mapDir = FILE_PATH."data/maps/".$this->server->mapName."/"; $this->gen = new Generator("DefaultGenerator", $this->server->seed); if($this->getProperty("generator-settings") !== false){