Faction Missions Implemented + Allowed Console to give points now
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user