mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Removed seed and spawn from server.properties
This commit is contained in:
@ -334,9 +334,23 @@ class Generator{
|
||||
return $chunk;
|
||||
}
|
||||
|
||||
public function save($file){
|
||||
@mkdir(dirname($file), 0777, true);
|
||||
return file_put_contents($file, $this->raw);
|
||||
public function save($dir, $name){
|
||||
@mkdir($dir, 0777, true);
|
||||
file_put_contents($dir."chunks.dat", $this->raw);
|
||||
$s = $this->getSpawn();
|
||||
$array = array();
|
||||
file_put_contents($dir."entities.dat", serialize($array));
|
||||
file_put_contents($dir."tileEntities.dat", serialize($array));
|
||||
$level = array(
|
||||
"LevelName" => $name,
|
||||
"Time" => 0,
|
||||
"Gamemode" => 1,
|
||||
"RandomSeed" => $this->seed,
|
||||
"SpawnX" => $s[0],
|
||||
"SpawnY" => $s[1],
|
||||
"SpawnX" => $s[2],
|
||||
);
|
||||
file_put_contents($dir."level.dat", serialize($level));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user