mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-27 20:59:16 +01:00
f balance now accepts an optional <faction name> parameter. f who now shows balance of the faction.
This commit is contained in:
parent
ea8310c695
commit
9f8f125a92
@ -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()));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user