Remove "reward points" feature
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import client.command.CommandContext;
|
||||
|
||||
public class ReadPointsCommand extends Command {
|
||||
{
|
||||
setDescription("Show point total.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(Client client, String[] params, CommandContext ctx) {
|
||||
|
||||
Character player = client.getPlayer();
|
||||
if (params.length > 2) {
|
||||
player.yellowMessage("Syntax: @points (rp|all)");
|
||||
return;
|
||||
} else if (params.length == 0) {
|
||||
player.yellowMessage("RewardPoints: " + player.getRewardPoints());
|
||||
return;
|
||||
}
|
||||
|
||||
switch (params[0]) {
|
||||
case "rp":
|
||||
player.yellowMessage("RewardPoints: " + player.getRewardPoints());
|
||||
break;
|
||||
default:
|
||||
player.yellowMessage("RewardPoints: " + player.getRewardPoints());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import client.command.CommandContext;
|
||||
|
||||
public class GiveRpCommand extends Command {
|
||||
{
|
||||
setDescription("Give reward points to a player.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(Client client, String[] params, CommandContext ctx) {
|
||||
Character player = client.getPlayer();
|
||||
if (params.length < 2) {
|
||||
player.yellowMessage("Syntax: !giverp <playername> <gainrewardpoint>");
|
||||
return;
|
||||
}
|
||||
|
||||
Character victim = client.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.setRewardPoints(victim.getRewardPoints() + Integer.parseInt(params[1]));
|
||||
player.message("RP given. Player " + params[0] + " now has " + victim.getRewardPoints()
|
||||
+ " reward points.");
|
||||
} else {
|
||||
player.message("Player '" + params[0] + "' could not be found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user