public static <P extends Player,Plugin extends PlayerPlugin<P>>
    List<P> showDialog(Component component, List<Plugin> plugins) {
        List<P> enabledPlayers = new ArrayList<>();
        
        // find the players in the plugins and register them per plugin name!
        Map<String,List<P>> map = new HashMap<>();
        for(Plugin plugin : plugins) {
            List<P> players = plugin.getPlayers();
            List<P> list = map.get(plugin.getName());
            if (list==null) {
                list = new ArrayList<P>();
                map.put(plugin.getName(), list);
            }
            list.addAll(players);
        }
        
        // create GUI
        JPanel allPluginsPanel = new JPanel();
        allPluginsPanel.setLayout(new BoxLayout(allPluginsPanel, BoxLayout.Y_AXIS));
        
        for(String pluginName: map.keySet()) {
            PluginSelectionPanel panel = new PluginSelectionPanel();
            // fill panel with the corresponding players, and also fill enabled Players list
            panel.setPlugins(pluginName, map.get(pluginName), enabledPlayers); 
            allPluginsPanel.add(panel);
        }
        
        /** show dialog panel and wait for cancel or okay button to be pressed. **/
        int option = JOptionPane.showConfirmDialog(component, 
                allPluginsPanel, 
                "select players", 
                OK_CANCEL_OPTION, 
                PLAIN_MESSAGE);
        
        if (option == OK_OPTION) {
            return enabledPlayers; 
        } else {
            return null;
        }
    }