mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Don't write server.properties to disk unless it's been modified at runtime
This commit is contained in:
parent
feade9d982
commit
32714d4564
@ -1714,8 +1714,9 @@ class Server{
|
||||
$this->setDefaultLevel($this->getLevelByName($default));
|
||||
}
|
||||
|
||||
|
||||
$this->properties->save(true);
|
||||
if($this->properties->hasChanged()){
|
||||
$this->properties->save(true);
|
||||
}
|
||||
|
||||
if(!($this->getDefaultLevel() instanceof Level)){
|
||||
$this->getLogger()->emergency($this->getLanguage()->translateString("pocketmine.level.defaultError"));
|
||||
@ -2073,8 +2074,10 @@ class Server{
|
||||
$this->scheduler->mainThreadHeartbeat(PHP_INT_MAX);
|
||||
}
|
||||
|
||||
$this->getLogger()->debug("Saving properties");
|
||||
$this->properties->save();
|
||||
if($this->properties->hasChanged()){
|
||||
$this->getLogger()->debug("Saving properties");
|
||||
$this->properties->save();
|
||||
}
|
||||
|
||||
$this->getLogger()->debug("Closing console");
|
||||
$this->console->shutdown();
|
||||
|
Loading…
x
Reference in New Issue
Block a user