maniaControl = $maniaControl;iaControl\Plugins\Plugin::getAuthor() */ public static function getAuthor() { return self::PLUGIN_AUTHOR; } /** * @see \ManiaControl\Plugins\Plugin::getDescription() */ public static function getDescription() { return 'Tool to manage the Guestlist'; } /** * @see \ManiaControl\Plugins\Plugin::load() */ public function load(ManiaControl $maniaControl) { $this->maniaControl = $maniaControl; $this->maniaControl->getCommandManager()->registerCommandListener('pause', $this, 'onCommandPause', true, 'Launch the pause'); $this->maniaControl->getCommandManager()->registerCommandListener('endpause', $this, 'onCommandEndPause', true, 'End the pause'); $this->maniaControl->getCommandManager()->registerCommandListener('endround', $this, 'onCommandEndRound', true, 'end the round'); $this->maniaControl->getCommandManager()->registerCommandListener(['endwu', 'endwarmup'], $this, 'onCommandEndWarmUp', true, 'End the WarmUp'); return true; } /** * @see \ManiaControl\Plugins\Plugin::unload() */ public function unload() { } /** * Send Pause * * @param array $chat * @param \ManiaControl\Players\Player $player */ public function onCommandPause(Array $chat, Player $player) { $this->maniaControl->getModeScriptEventManager()->startPause(); $this->maniaControl->getChat()->sendSuccessToAdmins('Pause sent'); } /** * Send End Pause * * @param array $chat * @param \ManiaControl\Players\Player $player */ public function onCommandEndPause(Array $chat, Player $player) { $this->maniaControl->getModeScriptEventManager()->endPause(); $this->maniaControl->getChat()->sendSuccessToAdmins('Pause stopped'); } /** * Send End Round * * @param array $chat * @param \ManiaControl\Players\Player $player */ public function onCommandEndRound(Array $chat, Player $player) { $this->maniaControl->getModeScriptEventManager()->forceTrackmaniaRoundEnd(); $this->maniaControl->getChat()->sendSuccessToAdmins('End Round sent'); } /** * Send End Warmup * * @param array $chat * @param \ManiaControl\Players\Player $player */ public function onCommandEndWarmUp(Array $chat, Player $player) { $this->maniaControl->getModeScriptEventManager()->triggerModeScriptEvent("Trackmania.WarmUp.ForceStop"); $this->maniaControl->getChat()->sendSuccessToAdmins('End Round sent'); } }