This tutorial also includes two other commands to lock/unlock yell.
Purpose: If you get people spamming your ::yell command you can disable/enable yelling. You can also apply words to a filter which will block the yell. Also yells are recorded to a yells.txt file incase you need to review them 
Files modified: client.java, server.java
Dificulty: Depends on your knowledge of java and copy and pasting skill 
Before we start, you may wish to backup your client and server.java incase anything major arrises.
To start with, go into your logs folder and create a file named yells.txt
Open up client.java and search for ("yell") Once you've found it, replace the whole command with the following:
Code:
if (command.startsWith("yell") && command.length() > 5){
BufferedWriter yellBW = null;
if(muted == 1) //Checks if the player is muted/not muted
sendMessage("You are muted and cannot yell!");
else if(server.lockyell == false) { //If yell isn't locked
String text = command.substring(5);
String[] bad = {"chalreq", "duelreq", "tradereq", "no-ip.biz", "no-ip.org", "servegame", ".com", ".net", ".org", "no-ip", "****", "is gay", "****", "crap", "rubbish",}; //Add more filtered words here.
for(int i = 0; i < bad.length; i++){
if(text.indexOf(bad[i]) >= 0){
sendMessage("You are not allowed to say that on Yell!");
return;
}
}
PlayerHandler.messageToAll = playerName+ " - " +command.substring(5); //If the yell isn't filtered/locked etc.
} else {
sendMessage("The yell command is currently disabled"); //If yell is locked
}
try {
yellBW = new BufferedWriter(new FileWriter("logs/yells.txt", true)); //You may need to edit this line to your yells.txt file location.
yellBW.write(playerName+" yelled "+command.substring(5));
yellBW.newLine();
yellBW.write("-------------------------------------");
yellBW.newLine();
yellBW.flush();
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
if (yellBW != null) try {
yellBW.close();
} catch (IOException ioe2) {
sendMessage(" ");
}
}
disconnected = false;
}
That's the new yell command which includes a filter, logs, muted and locked/unlocked check. Next you need to add the commands to lock and unlock yell. Under/above the yell command, or wherever you want to add it, add the two following commands.
Code:
if (command.equalsIgnoreCase("disableyell") && playerRights >= 2) {
server.lockyell = true;
PlayerHandler.messageToAll = "Administrator "+p.playerName+" Has temporally disabled yell";
}
if (command.equalsIgnoreCase("enableyell") && playerRights >= 2) {
server.lockyell = false;
PlayerHandler.messageToAll = "Yell Enabled.";
}
You may now save and close client.java
Open up server.java
Under where it says public class server implements Runnable { add this:
Code:
public static boolean lockyell;
You may now save and close server.java. Your also finished with everything now. You shouldn't get any errors. If you do most will be able to be fixed with a bit of editing. Report any major errors & problems etc.
This was created by me for my Server; If you see it anywhere else then it's leached - Let me know 
Credits: 100% AndyJay123