public function execute($login, InputInterface $input)
    {
        $scriptToExecute = 'run.sh';
        if ($this->gameData->getServerOs() == GameDataStorage::OS_WINDOWS) {
            $scriptToExecute = 'run.bat';
        }

        $player = $this->playerStorage->getPlayerInfo($login);
        $this->chatNotification->sendMessage(
            'expansion_core.chat_commands.restart.message',
            null,
            ['%nickname%' => $player->getNickName()]
        );
        $this->application->stopApplication();

        $process = new Process("bin/" . $scriptToExecute . " &");
        $process->start();
    }
public function execute($login, InputInterface $input)
    {
        $scriptToExecute = 'run.sh';
        if ($this->gameData->getServerOs() == GameDataStorage::OS_WINDOWS) {
            $scriptToExecute = 'run.bat';
        }

        $player = $this->playerStorage->getPlayerInfo($login);
        $this->chatNotification->sendMessage(
            'expansion_core.chat_commands.restart.message',
            null,
            ['%nickname%' => $player->getNickName()]
        );
        $this->application->stopApplication();

        $process = new Process("bin/" . $scriptToExecute . " &");
        $process->start();
    }
public function execute ( $ login , InputInterface $ input ) { $ scriptToExecute = 'run.sh' ; if ( $ this -> gameData -> getServerOs ( ) == GameDataStorage :: OS_WINDOWS ) { $ scriptToExecute = 'run.bat' ; } $ player = $ this -> playerStorage -> getPlayerInfo ( $ login ) ; $ this -> chatNotification -> sendMessage ( 'expansion_core.chat_commands.restart.message' , null , [ '%nickname%' => $ player -> getNickName ( ) ] ) ; $ this -> application -> stopApplication ( ) ; $ process = new Process ( "bin/" . $ scriptToExecute . " &" ) ; $ process -> start ( ) ; }
Method called to execute the chat command.

@param string         $login
@param InputInterface $input

@return mixed
Method called to execute the chat command .