String name = l.getSelectedItem().substring(0, Math.max(0, l.getSelectedItem().indexOf(" :")));
String name = ((String) l.getSelectedValue()).substring(0, Math.max(0, ((String) l.getSelectedValue()).indexOf(" :")));
    private Client getPlayerListSelected(List l) {        if (l.getSelectedIndex() == -1) {            return client;        }        String name = l.getSelectedItem().substring(0, Math.max(0, l.getSelectedItem().indexOf(" :"))); //$NON-NLS-1$        BotClient c = (BotClient) clientgui.getBots().get(name);        if (c == null && client.getName().equals(name)) {            return client;        }        return c;    }