If Level is not loaded, while trying to load it, send an error message.

This commit is contained in:
kotyaralih 2021-12-28 10:56:03 -08:00
parent ed8c2eeccd
commit 11cf320a39

View file

@ -151,6 +151,10 @@ class LevelAPI{
$path = DATA_PATH."worlds/".$name."/";
console("[INFO] Preparing level \"".$name."\"");
$level = new PMFLevel($path."level.pmf");
if(!$level->isLoaded){
console("[ERROR] Could not load level \"".$name."\"");
return false;
}
$entities = new Config($path."entities.yml", CONFIG_YAML);
if(file_exists($path."tileEntities.yml")){
@rename($path."tileEntities.yml", $path."tiles.yml");