WorldManager: don't hard-depend on server configuration for autosave settings

This commit is contained in:
Dylan K. Taylor 2020-05-23 09:43:59 +01:00
parent fcea7da183
commit 8d9759288c
2 changed files with 2 additions and 3 deletions

View File

@ -1019,6 +1019,8 @@ class Server{
GeneratorManager::registerDefaultGenerators();
$this->worldManager = new WorldManager($this, $this->dataPath . "/worlds");
$this->worldManager->setAutoSave($this->getConfigBool("auto-save", $this->worldManager->getAutoSave()));
$this->worldManager->setAutoSaveInterval((int) $this->getProperty("ticks-per.autosave", 6000));
$this->updater = new AutoUpdater($this, $this->getProperty("auto-updater.host", "update.pmmp.io"));

View File

@ -75,9 +75,6 @@ class WorldManager{
public function __construct(Server $server, string $dataPath){
$this->server = $server;
$this->dataPath = $dataPath;
$this->autoSave = $this->server->getConfigBool("auto-save", $this->autoSave);
$this->autoSaveTicks = (int) $this->server->getProperty("ticks-per.autosave", 6000);
}
/**