Faction Missions Implemented + Allowed Console to give points now

This commit is contained in:
Driftay
2019-08-07 14:35:19 -04:00
parent 92d46f91f4
commit 769394a058
16 changed files with 372 additions and 10 deletions

View File

@@ -32,7 +32,7 @@ public class CmdPoints extends FCommand {
@Override
public void perform() {
if (!P.p.getConfig().getBoolean("f-points.Enabled", true)) {
fme.msg(TL.GENERIC_DISABLED);
msg(TL.GENERIC_DISABLED);
return;
}
this.commandChain.add(this);

View File

@@ -45,16 +45,17 @@ public class CmdPointsAdd extends FCommand {
}
if (faction == null || faction.isWilderness()) {
fme.msg(TL.COMMAND_POINTS_FAILURE.toString().replace("{faction}", args.get(0)));
msg(TL.COMMAND_POINTS_FAILURE.toString().replace("{faction}", args.get(0)));
return;
}
if(argAsInt(1) <= 0){
fme.msg(TL.COMMAND_POINTS_INSUFFICIENT);
msg(TL.COMMAND_POINTS_INSUFFICIENT);
return;
}
faction.setPoints(faction.getPoints() + argAsInt(1));
fme.msg(TL.COMMAND_POINTS_SUCCESSFUL, argAsInt(1), faction.getTag(), faction.getPoints());
msg(TL.COMMAND_POINTS_SUCCESSFUL, argAsInt(1), faction.getTag(), faction.getPoints());
}

View File

@@ -43,17 +43,17 @@ public class CmdPointsRemove extends FCommand {
}
if (faction == null || faction.isWilderness()) {
fme.msg(TL.COMMAND_POINTS_FAILURE.toString().replace("{faction}", args.get(0)));
msg(TL.COMMAND_POINTS_FAILURE.toString().replace("{faction}", args.get(0)));
return;
}
if(argAsInt(1) <= 0){
fme.msg(TL.COMMAND_POINTS_INSUFFICIENT);
msg(TL.COMMAND_POINTS_INSUFFICIENT);
return;
}
faction.setPoints(faction.getPoints() - argAsInt(1));
fme.msg(TL.COMMAND_REMOVEPOINTS_SUCCESSFUL, argAsInt(1), faction.getTag(), faction.getPoints());
msg(TL.COMMAND_REMOVEPOINTS_SUCCESSFUL, argAsInt(1), faction.getTag(), faction.getPoints());
}

View File

@@ -42,17 +42,17 @@ public class CmdPointsSet extends FCommand {
}
if (faction == null || faction.isWilderness()) {
fme.msg(TL.COMMAND_POINTS_FAILURE.toString().replace("{faction}", args.get(0)));
msg(TL.COMMAND_POINTS_FAILURE.toString().replace("{faction}", args.get(0)));
return;
}
if(argAsInt(1) < 0){
fme.msg(TL.COMMAND_POINTS_INSUFFICIENT);
msg(TL.COMMAND_POINTS_INSUFFICIENT);
return;
}
faction.setPoints(argAsInt(1));
fme.msg(TL.COMMAND_SETPOINTS_SUCCESSFUL, argAsInt(1), faction.getTag(), faction.getPoints());
msg(TL.COMMAND_SETPOINTS_SUCCESSFUL, argAsInt(1), faction.getTag(), faction.getPoints());
}