} else if (event.getSource() == lisPlayerInfo) { butRemoveBot.setEnabled(false); Client c = getPlayerListSelected(lisPlayerInfo); if (c == null) { lisPlayerInfo.setSelectedIndex(-1); return; } if (c instanceof BotClient) { butRemoveBot.setEnabled(true); } choTeam.setSelectedIndex(c.getLocalPlayer().getTeam());
    public void valueChanged(ListSelectionEvent event) {        if (event.getSource().equals(butRemoveBot)) {            butRemoveBot.setEnabled(false);            Client c = getPlayerListSelected(lisPlayerInfo);            if (c == null) {                lisPlayerInfo.setSelectedIndex(-1);                return;            }            if (c instanceof BotClient) {                butRemoveBot.setEnabled(true);            }            choTeam.setSelectedIndex(c.getLocalPlayer().getTeam());        } else if (event.getSource().equals(lisEntities)) {            boolean selected = lisEntities.getSelectedIndex() != -1;            butCustom.setEnabled(selected);            // Handle "Blind drop" option.            if (selected && client.game.getOptions().booleanOption("blind_drop")) { //$NON-NLS-1$                Entity entity = client.game.getEntity(entityCorrespondance[lisEntities.getSelectedIndex()]);                butMechReadout.setEnabled(entity.getOwner().equals(client.getLocalPlayer()));                butCustom.setEnabled(entity.getOwner().equals(client.getLocalPlayer()));            } else {                butMechReadout.setEnabled(selected);            }            butDelete.setEnabled(selected);        }    }