public function registerPlugin($pluginId, ChatCommandPluginInterface $pluginService)
    {
        $commands = $pluginService->getChatCommands();

        foreach ($commands as $command) {
            $this->addCommand($pluginId, $command->getCommand(), $command);

            foreach ($command->getAliases() as $alias) {
                $this->addCommand($pluginId, $alias, $command);
            }
        }
    }
public function registerPlugin($pluginId, ChatCommandPluginInterface $pluginService)
    {
        $commands = $pluginService->getChatCommands();

        foreach ($commands as $command) {
            $this->addCommand($pluginId, $command->getCommand(), $command);

            foreach ($command->getAliases() as $alias) {
                $this->addCommand($pluginId, $alias, $command);
            }
        }
    }
public function registerPlugin ( $ pluginId , ChatCommandPluginInterface $ pluginService ) { $ commands = $ pluginService -> getChatCommands ( ) ; foreach ( $ commands as $ command ) { $ this -> addCommand ( $ pluginId , $ command -> getCommand ( ) , $ command ) ; foreach ( $ command -> getAliases ( ) as $ alias ) { $ this -> addCommand ( $ pluginId , $ alias , $ command ) ; } } }
Registers all chat commands of a plugin.

@param string                     $pluginId
@param ChatCommandPluginInterface $pluginService

@throws CommandExistException
Registers all chat commands of a plugin .