protected function addCommand($pluginId, $cmdTxt, ChatCommandInterface $command)
    {
        if (isset($this->commands[$cmdTxt])) {
            throw new CommandExistException(
                "$pluginId tries to register command '$cmdTxt' already registered"
            );
        }

        $this->commands[$cmdTxt] = $command;
        $this->commandPlugin[$pluginId][$cmdTxt] = $command;
    }
protected function addCommand($pluginId, $cmdTxt, ChatCommandInterface $command)
    {
        if (isset($this->commands[$cmdTxt])) {
            throw new CommandExistException(
                "$pluginId tries to register command '$cmdTxt' already registered"
            );
        }

        $this->commands[$cmdTxt] = $command;
        $this->commandPlugin[$pluginId][$cmdTxt] = $command;
    }
protected function addCommand ( $ pluginId , $ cmdTxt , ChatCommandInterface $ command ) { if ( isset ( $ this -> commands [ $ cmdTxt ] ) ) { throw new CommandExistException ( "$pluginId tries to register command '$cmdTxt' already registered" ) ; } $ this -> commands [ $ cmdTxt ] = $ command ; $ this -> commandPlugin [ $ pluginId ] [ $ cmdTxt ] = $ command ; }
Register a command.

@param string               $pluginId
@param string               $cmdTxt
@param ChatCommandInterface $command

@throws CommandExistException
Register a command .