f balance now accepts an optional <faction name> parameter. f who now shows balance of the faction.

This commit is contained in:
Harry Jeffery 2011-09-26 16:44:20 +01:00
parent ea8310c695
commit 9f8f125a92
2 changed files with 11 additions and 3 deletions

View File

@ -10,7 +10,9 @@ public class FCommandBalance extends FBaseCommand {
aliases.add("balance");
aliases.add("money");
helpDescription = "Shows the faction's current balance";
optionalParameters.add("faction name");
helpDescription = "Shows a faction's current balance";
}
@Override
@ -23,9 +25,10 @@ public class FCommandBalance extends FBaseCommand {
return;
}
Faction faction = me.getFaction();
String factionName = parameters.get(0);
Faction faction = findFaction(factionName, true);
sendMessage(Conf.colorChrome+"Balance: "+ Econ.moneyString(faction.getMoney()));
sendMessage(Conf.colorChrome+faction.getTag()+"'s balance: "+ Econ.moneyString(faction.getMoney()));
}
}

View File

@ -83,6 +83,11 @@ public class FCommandShow extends FBaseCommand {
String stringRefund = (refund > 0.0) ? (" ("+Econ.moneyString(refund)+" depreciated)") : "";
sendMessage(Conf.colorChrome+"Total land value: " + Conf.colorSystem + stringValue + stringRefund);
}
//Show bank contents
if(Conf.bankEnabled) {
sendMessage(Conf.colorChrome+"Bank contains: " + Conf.colorSystem + Econ.moneyString(faction.getMoney()));
}
}
String listpart;