Here is the IP-Mute command in case anyone wanted it to turn it into 667/718 code.
Insert this before your IPBan command.
Code:
}
if (playerCommand.startsWith("ipmute")) {
try {
String playerToBan = playerCommand.substring(7);
for (int i = 0; i < Config.MAX_PLAYERS; i++) {
if (Server.playerHandler.players[i] != null) {
if (Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
Connection.addIpToMuteList(Server.playerHandler.players[i].connectedFrom);
c.sendMessage("You have IP Muted the user: " + Server.playerHandler.players[i].playerName);
Client c2 = (Client) Server.playerHandler.players[i];
c2.sendMessage("You have been muted by: " + c.playerName);
c2.sendMessage(" " + c2.playerName + " Got IpMuted By " + c.playerName + ".");
for (int z = 0; z < Server.playerHandler.players.length; z++) {
if (Server.playerHandler.players[z] != null) {
Client o = (Client) Server.playerHandler.players[z];
o.sendMessage("<col=29184>[" + Misc.optimizeText(c2.playerName) + "]</col> <col=800000000>has just been IP muted by " + Misc.optimizeText(c.playerName) + ".");
}
}
break;
}
}
}
} catch (Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}
Sorry if this is in the wrong section. I didn't know if it was meant to be in the help section or tutorial section. If it is in the wrong section please move it.