diff --git a/src/Server.php b/src/Server.php index e691f5411..e1fad2d2d 100644 --- a/src/Server.php +++ b/src/Server.php @@ -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")); diff --git a/src/world/WorldManager.php b/src/world/WorldManager.php index c504494fb..6d0689a38 100644 --- a/src/world/WorldManager.php +++ b/src/world/WorldManager.php @@ -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); } /**