Server: initialize auto updater before loading plugins, not after

from a plugin PoV, getUpdater() is always supposed to return an AutoUpdater instance, but it would return null during onLoad(), which is bad.
This commit is contained in:
Dylan K. Taylor 2020-02-05 20:32:51 +00:00
parent ecf662bf74
commit 0d19f6c968

View File

@ -1522,10 +1522,9 @@ class Server{
$this->queryRegenerateTask = new QueryRegenerateEvent($this);
$this->pluginManager->loadPlugins($this->pluginPath);
$this->updater = new AutoUpdater($this, $this->getProperty("auto-updater.host", "update.pmmp.io"));
$this->pluginManager->loadPlugins($this->pluginPath);
$this->enablePlugins(PluginLoadOrder::STARTUP);
$this->network->registerInterface(new RakLibInterface($this));