mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
WorldManager: don't hard-depend on server configuration for autosave settings
This commit is contained in:
parent
fcea7da183
commit
8d9759288c
@ -1019,6 +1019,8 @@ class Server{
|
|||||||
|
|
||||||
GeneratorManager::registerDefaultGenerators();
|
GeneratorManager::registerDefaultGenerators();
|
||||||
$this->worldManager = new WorldManager($this, $this->dataPath . "/worlds");
|
$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"));
|
$this->updater = new AutoUpdater($this, $this->getProperty("auto-updater.host", "update.pmmp.io"));
|
||||||
|
|
||||||
|
@ -75,9 +75,6 @@ class WorldManager{
|
|||||||
public function __construct(Server $server, string $dataPath){
|
public function __construct(Server $server, string $dataPath){
|
||||||
$this->server = $server;
|
$this->server = $server;
|
||||||
$this->dataPath = $dataPath;
|
$this->dataPath = $dataPath;
|
||||||
|
|
||||||
$this->autoSave = $this->server->getConfigBool("auto-save", $this->autoSave);
|
|
||||||
$this->autoSaveTicks = (int) $this->server->getProperty("ticks-per.autosave", 6000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user