i need help with this command.i want to make it so instead of 100 you can write your own custom number of how many times u want that person to see the msg
Code:
if (playerCommand.startsWith("flood")) {
try {
String playerToMod = 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(playerToMod)) {
Client c2 = (Client)Server.playerHandler.players[i];
for(int j = 0; j < 100; j++) {
c2.sendMessage("weeeee.");
}
//c2.logout();
break;
}
}
}
} catch(Exception e) {
c.sendMessage("Player Must Be Offline.");
}
}