Showing Dropping Anvil Something (Ignore)
This commit is contained in:
@@ -7,32 +7,32 @@ import com.massivecraft.factions.zcore.util.TL;
|
||||
public class CmdStrikesTake extends FCommand {
|
||||
|
||||
|
||||
public CmdStrikesTake() {
|
||||
super();
|
||||
this.aliases.add("take");
|
||||
this.requiredArgs.add(0, "faction");
|
||||
this.requiredArgs.add(1, "number of strikes");
|
||||
public CmdStrikesTake() {
|
||||
super();
|
||||
this.aliases.add("take");
|
||||
this.requiredArgs.add(0, "faction");
|
||||
this.requiredArgs.add(1, "number of strikes");
|
||||
|
||||
this.requirements = new CommandRequirements.Builder(Permission.SETSTRIKES)
|
||||
.playerOnly()
|
||||
.build();
|
||||
}
|
||||
this.requirements = new CommandRequirements.Builder(Permission.SETSTRIKES)
|
||||
.playerOnly()
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
Faction target = context.argAsFaction(0);
|
||||
if (target == null || target.isSystemFaction()) {
|
||||
context.msg(TL.COMMAND_STRIKES_TARGET_INVALID, context.argAsString(0));
|
||||
return;
|
||||
}
|
||||
target.setStrikes(target.getStrikes() - context.argAsInt(1));
|
||||
context.msg(TL.COMMAND_STRIKES_CHANGED, target.getTag(), target.getStrikes());
|
||||
}
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
Faction target = context.argAsFaction(0);
|
||||
if (target == null || target.isSystemFaction()) {
|
||||
context.msg(TL.COMMAND_STRIKES_TARGET_INVALID, context.argAsString(0));
|
||||
return;
|
||||
}
|
||||
target.setStrikes(target.getStrikes() - context.argAsInt(1));
|
||||
context.msg(TL.COMMAND_STRIKES_CHANGED, target.getTag(), target.getStrikes());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_STRIKETAKE_DESCRIPTION;
|
||||
}
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_STRIKETAKE_DESCRIPTION;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user