Factions/src/com/massivecraft/factions/cmd/CmdFactionsMoneyBalance.java
Magnus Ulf 1e20892392 Add some parameter descriptions
there are more to come
2019-02-01 11:21:46 +01:00

40 lines
1.1 KiB
Java

package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled;
import com.massivecraft.factions.cmd.type.TypeFaction;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.massivecore.MassiveException;
public class CmdFactionsMoneyBalance extends FactionsCommand
{
// -------------------------------------------- //
// CONSTRUCT
// -------------------------------------------- //
public CmdFactionsMoneyBalance()
{
// Parameters
this.addParameter(TypeFaction.get(), "faction", "you").setDesc("the faction whose balance to check");
// Requirements
this.addRequirements(ReqBankCommandsEnabled.get());
}
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public void perform() throws MassiveException
{
Faction faction = this.readArg(msenderFaction);
if (faction != msenderFaction && ! Perm.MONEY_BALANCE_ANY.has(sender, true)) return;
Econ.sendBalanceInfo(msender, faction);
}
}