public < T extends SimonConsolePlugin > List < T > getPluginsByType ( Class < T > pluginType ) { List < T > specPlugins = new ArrayList <> ( ) ; for ( SimonConsolePlugin plugin : plugins ) { if ( pluginType . isInstance ( plugin ) ) { specPlugins . add ( pluginType . cast ( plugin ) ) ; } } return Collections . unmodifiableList ( specPlugins ) ; }
Return plugin list filtered by plugin type .