function onInit()
 {
     $this->setVersion('4.0.0');
     $this->addDependency(new \ManiaLive\PluginHandler\Dependency('ManiaLive', '4.0.0'));
     //Load MatchMaker and helpers for GUI
     $this->config = Config::getInstance();
     $this->scriptName = \ManiaLivePlugins\MatchMakingLobby\Config::getInstance()->script ?: preg_replace('~(?:.*?[\\\\/])?(.*?)\\.Script\\.txt~ui', '$1', $this->storage->gameInfos->scriptName);
     $matchMakerClassName = $this->config->getMatchMakerClassName($this->scriptName);
     if (!class_exists($matchMakerClassName)) {
         throw new \Exception(sprintf("Can't find class %s. You should either set up the config : ManiaLivePlugins\\MatchMakingLobby\\Config.matchMakerClassName or the script name", $matchMakerClassName));
     }
     $guiClassName = $this->config->getGuiClassName($this->scriptName);
     if (!class_exists($guiClassName)) {
         throw new \Exception(sprintf("Can't find class %s. You should either set up the config : ManiaLivePlugins\\MatchMakingLobby\\Config.guiClassName or the script name", $guiClassName));
     }
     $this->matchMakingService = new Services\MatchMakingService();
     $this->matchMakingService->createTables();
     $this->setGui(new $guiClassName());
     $this->gui->lobbyBoxPosY = 45;
     $this->setMatchMaker($matchMakerClassName::getInstance());
     $this->dictionary = \ManiaLivePlugins\MatchMakingLobby\Utils\Dictionary::getInstance($this->config->getDictionnary($this->scriptName));
     $this->allyService = Services\AllyService::getInstance($this->storage->serverLogin, $this->scriptName, $this->connection->getSystemInfo()->titleId);
     return true;
 }
 protected function isEverybodyHere()
 {
     $matchMakerClassName = $this->config->getMatchMakerClassName($this->scriptName);
     $matchMaker = $matchMakerClassName::getInstance();
     return count(array_filter($this->players, function ($p) {
         return $p == Services\PlayerInfo::PLAYER_STATE_CONNECTED;
     })) == $matchMaker->getPlayersPerMatch();
 }