Fixed Server::isLevelgenerated()

This commit is contained in:
Shoghi Cervantes 2014-04-03 00:35:38 +02:00
parent 83eb032393
commit a2536ed308

View File

@ -759,6 +759,7 @@ class Server{
return true;
}elseif(!$this->isLevelGenerated($name)){
console("[NOTICE] Level \"" . $name . "\" not found");
return false;
}
$path = $this->getDataPath() . "worlds/" . $name . "/";
@ -914,7 +915,7 @@ class Server{
return false;
}
$path = $this->getDataPath() . "worlds/" . $name . "/";
if($this->getLevel($name) === false and !file_exists($path . "level.pmf")){
if(!($this->getLevel($name) instanceof Level) and !file_exists($path . "level.pmf")){
if(file_exists($path)){
$level = new LevelImport($path);
if($level->import() === false){ //Try importing a world