mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
If Level is not loaded, while trying to load it, send an error message.
This commit is contained in:
parent
ed8c2eeccd
commit
11cf320a39
1 changed files with 4 additions and 0 deletions
|
|
@ -151,6 +151,10 @@ class LevelAPI{
|
||||||
$path = DATA_PATH."worlds/".$name."/";
|
$path = DATA_PATH."worlds/".$name."/";
|
||||||
console("[INFO] Preparing level \"".$name."\"");
|
console("[INFO] Preparing level \"".$name."\"");
|
||||||
$level = new PMFLevel($path."level.pmf");
|
$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);
|
$entities = new Config($path."entities.yml", CONFIG_YAML);
|
||||||
if(file_exists($path."tileEntities.yml")){
|
if(file_exists($path."tileEntities.yml")){
|
||||||
@rename($path."tileEntities.yml", $path."tiles.yml");
|
@rename($path."tileEntities.yml", $path."tiles.yml");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue