public function registerCommands(string $plugin, array $commands)
    {
        $newCommands = [];

        foreach($commands as $commandClass) {
            $command = new $commandClass($plugin);
            $command = CommandFactory::setNamespace($command);
            $this->add($command);
            $newCommands[] = $command;
        }
        return $newCommands;
    }