mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Set a name for unnamed worlds
This commit is contained in:
parent
6dcf9e5da1
commit
7c33c4f75a
1 changed files with 3 additions and 0 deletions
|
|
@ -352,6 +352,9 @@ class ServerAPI{
|
|||
if(file_exists($dir."level.dat")){
|
||||
$nbt = new NBT();
|
||||
$level = parseNBTData($nbt->loadFile($dir."level.dat"));
|
||||
if($level["LevelName"] == ""){
|
||||
$level["LevelName"] = "world".time();
|
||||
}
|
||||
console("[DEBUG] Importing map \"".$level["LevelName"]."\" gamemode ".$level["GameType"]." with seed ".$level["RandomSeed"], true, true, 2);
|
||||
unset($level["Player"]);
|
||||
$lvName = $level["LevelName"]."/";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue