mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Added world compression
This commit is contained in:
parent
3ba8662c2c
commit
3e9afbdf54
4 changed files with 26 additions and 7 deletions
|
|
@ -154,7 +154,7 @@ class PocketMinecraftServer extends stdClass{
|
|||
public function close($reason = "stop"){
|
||||
if($this->stop !== true){
|
||||
$this->chat(false, "Stopping server...");
|
||||
$this->save();
|
||||
$this->save(true);
|
||||
$this->stop = true;
|
||||
$this->trigger("server.close");
|
||||
$this->interface->close();
|
||||
|
|
@ -295,10 +295,10 @@ class PocketMinecraftServer extends stdClass{
|
|||
}
|
||||
}
|
||||
|
||||
public function save(){
|
||||
public function save($final = false){
|
||||
if($this->mapName !== false){
|
||||
file_put_contents($this->mapDir."level.dat", serialize($this->level));
|
||||
$this->map->saveMap();
|
||||
$this->map->saveMap($final);
|
||||
console("[INFO] Saving entities...");
|
||||
foreach($this->entities as $entity){
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue