thats my unjail command
Code:
if (command.startsWith("unjail") && playerRights >= 1) {
try {
String otherPName = command.substring(7);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
p.toX = 2525;
p.toY = 4776;
p.sM("You have been unjailed by " + playerName);
sM ("You have unjailed "+p.playerName+".");
p.sM("you are now free DONT BREAK THE RULES AGAIN");
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to unjail..");
}
}