private Element diplomacy(Element element) {
        Player player = getFreeColClient().getMyPlayer();
        DiplomacyMessage message = new DiplomacyMessage(getGame(), element);
        Unit unit = message.getUnit();
        if (unit == null) {
            logger.warning("Unit omitted from diplomacy message.");
            return null;
        }
        Settlement settlement = message.getSettlement();
        if (settlement == null) {
            logger.warning("Settlement omitted from diplomacy message.");
            return null;
        }
        Player other = (player.owns(unit)) ? settlement.getOwner()
            : unit.getOwner();
        String nation = Messages.message(other.getNationName());
        DiplomaticTrade agreement = message.getAgreement();

        switch (agreement.getStatus()) {
        case ACCEPT_TRADE:
            new ShowInformationMessageSwingTask(StringTemplate
                .template("negotiationDialog.offerAccepted")
                    .addName("%nation%", nation)).show();
            new UpdateMenuBarSwingTask().invokeLater();
            break;
        case REJECT_TRADE:
            new ShowInformationMessageSwingTask(StringTemplate
                .template("negotiationDialog.offerRejected")
                    .addName("%nation%", nation)).show();
            new UpdateMenuBarSwingTask().invokeLater();
            break;
        case PROPOSE_TRADE:
            DiplomaticTrade ourAgreement
                = gui.showNegotiationDialog(unit, settlement, agreement);
            if (ourAgreement == null) {
                agreement.setStatus(TradeStatus.REJECT_TRADE);
            } else {
                agreement = ourAgreement;
            }
            return new DiplomacyMessage(unit, settlement, agreement)
                .toXMLElement();
        default:
            logger.warning("Bogus trade status: " + agreement.getStatus());
            break;
        }
        return null;
    }