So bascially all my mute commands do is disable the person from private messaging...
here they are
Code:
if (command.startsWith("mute") && playerRights >= 1) {
try {
String otherPName = command.substring(5);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
p.muted = true;
writeLog(p.playerName, "mutes");
sM("You have muted "+p.playerName+"!");
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to mute..");
}
}
Code:
if (command.startsWith("ipmute") && playerRights >= 1) {
try {
String otherPName = command.substring(7);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
writeLog(p.connectedFrom, "mutes2");
p.muted = true;
p.sM(
"You have been ip muted by " + playerName);
sM("You have ip muted "+p.playerName+"");
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to tele to ip mute..");
}
}