protected function cancel($updateState = true) { \ManiaLive\Utilities\Logger::debug('cancel()'); if ($updateState) { $this->matchMakingService->updateMatchState($this->matchId, Services\Match::PLAYER_LEFT); } $this->gui->createLabel($this->gui->getMatchoverText(), null, null, false, false); $this->connection->chatSendServerMessageToLanguage($this->dictionary->getChat(array(array('textId' => 'matchAborted', 'params' => array(static::PREFIX))))); $this->over(); }
/** * @param string $login If null, set message for all non ready players */ protected function setNotReadyLabel($login = null) { $players = $login === null ? Services\PlayerInfo::GetNotReady() : array(Services\PlayerInfo::Get($login)); foreach ($players as $player) { $this->gui->removeLabel($player->login); if (!array_key_exists($player->login, $this->blockedPlayers)) { $message = null; if (count(Services\PlayerInfo::GetReady()) == 0 && $this->backupNeeded) { $message = $this->gui->getNoReadyPlayers(); } $this->setShortKey($player->login, array($this, 'onPlayerReady')); if ($message) { $this->gui->updateWaitingScreenLabel($message, $player->login); } } else { $this->resetShortKey($player->login); } } }