/**
* @param string $name
*
* @return bool
*/
public function isLevelGenerated($name)
{
if (trim($name) === "") {
return false;
}
$path = $this->getDataPath() . "worlds/" . $name . "/";
if (!$this->getLevelByName($name) instanceof Level) {
if (LevelProviderManager::getProvider($path) === null) {
return false;
}
/*if(file_exists($path)){
$level = new LevelImport($path);
if($level->import() === false){ //Try importing a world
return false;
}
}else{
return false;
}*/
}
return true;
}