2019-09-14 21:13:01 +02:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.Faction;
|
|
|
|
import com.massivecraft.factions.struct.Permission;
|
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
|
|
|
|
|
|
|
public class CmdStrikesInfo extends FCommand {
|
|
|
|
|
2019-12-02 20:03:27 +01:00
|
|
|
/**
|
|
|
|
* @author Driftay
|
|
|
|
*/
|
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
public CmdStrikesInfo() {
|
|
|
|
super();
|
2020-01-02 02:59:31 +01:00
|
|
|
this.aliases.addAll(Aliases.strikes_info);
|
2019-09-15 11:19:06 +02:00
|
|
|
this.optionalArgs.put("target", "faction");
|
|
|
|
|
|
|
|
this.requirements = new CommandRequirements.Builder(Permission.SETSTRIKES)
|
|
|
|
.playerOnly()
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform(CommandContext context) {
|
|
|
|
Faction target = context.argAsFaction(0);
|
|
|
|
if (target == null) target = context.faction;
|
|
|
|
if (target.isSystemFaction()) {
|
|
|
|
context.msg(TL.COMMAND_STRIKES_TARGET_INVALID, context.argAsString(0));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
context.msg(TL.COMMAND_STRIKES_INFO, target.getTag(), target.getStrikes());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_STRIKESINFO_DESCRIPTION;
|
|
|
|
}
|
2019-09-14 21:13:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
}
|