2011-10-13 14:41:07 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
import com.massivecraft.factions.Faction;
|
2011-10-13 14:41:07 +02:00
|
|
|
import com.massivecraft.factions.integration.Econ;
|
|
|
|
import com.massivecraft.factions.struct.Permission;
|
2014-12-08 00:12:52 +01:00
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
2011-10-13 14:41:07 +02:00
|
|
|
|
2014-04-04 20:55:21 +02:00
|
|
|
public class CmdMoneyBalance extends FCommand {
|
2014-08-05 17:17:27 +02:00
|
|
|
|
2019-03-03 04:51:21 +01:00
|
|
|
public CmdMoneyBalance() {
|
|
|
|
super();
|
|
|
|
this.aliases.add("b");
|
|
|
|
this.aliases.add("balance");
|
|
|
|
|
|
|
|
//this.requiredArgs.add("");
|
|
|
|
this.optionalArgs.put("faction", "yours");
|
|
|
|
|
|
|
|
this.permission = Permission.MONEY_BALANCE.node;
|
|
|
|
this.setHelpShort(TL.COMMAND_MONEYBALANCE_SHORT.toString());
|
|
|
|
|
|
|
|
|
|
|
|
senderMustBePlayer = false;
|
|
|
|
senderMustBeMember = false;
|
|
|
|
senderMustBeModerator = false;
|
|
|
|
senderMustBeAdmin = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform() {
|
|
|
|
Faction faction = myFaction;
|
|
|
|
if (this.argIsSet(0)) {
|
|
|
|
faction = this.argAsFaction(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (faction == null) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (faction != myFaction && !Permission.MONEY_BALANCE_ANY.has(sender, true)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (fme != null) {
|
|
|
|
Econ.sendBalanceInfo(fme, faction);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_MONEYBALANCE_DESCRIPTION;
|
|
|
|
}
|
2015-01-22 00:58:33 +01:00
|
|
|
|
2018-03-26 23:43:15 +02:00
|
|
|
}
|