try {
double price = TownySettings.getDeathPrice();
if (!defenderResident.canPayFromHoldings(price))
price = defenderResident.getHoldingBalance();
defenderResident.payTo(price, new WarSpoils(), "Death Payment");
TownyMessaging.sendMsg(defenderPlayer, "You lost " + TownyEconomyObject.getFormattedBalance(price) + ".");
} catch (EconomyException e) {
TownyMessaging.sendErrorMsg(defenderPlayer, "Could not take death funds.");
}
}