public final CommandRepository createCommandRepository ( ) { CommandRepository cr = new CommandRepository ( ) ; for ( Command c : commandSection . getAllCommands ( ) ) { CommandDefinition cd = new CommandDefinition ( c . getName ( ) , c . getPlugin ( ) ) ; cd . setArgs ( c . getCommandLine ( ) ) ; cr . addCommandDefinition ( cd ) ; } return cr ; }
Returns a command repository containing all the commands configured inside the configuration file .