public void loadAddOns ( ) { List < String > addonToLoad = getAddOnClasses ( ) ; for ( File f : new File ( StaticConfiguration . PLUGINS_HOME ) . listFiles ( ) ) { if ( f . isFile ( ) && f . getName ( ) . toUpperCase ( ) . endsWith ( ".JAR" ) ) { AddOnMetadata meta = AddOnMetadata . createAddOnMetadata ( f ) ; if ( meta != null ) { mAddons . add ( meta ) ; LOGGER . debug ( "load " + meta . getMainClass ( ) ) ; if ( addonToLoad . contains ( meta . getMainClass ( ) ) ) { loadAddOn ( meta ) ; } } } } }
Loads and registers all add - ons references in the engine configuration file .