I made this code myself for a delta server but it should work fine on here anyway, the coding around this should be exactly the same seeing as there's no sM codes or anything...
You will have to replace your yell command with:
Here's an example of what it would look like:
[Moderator] I Pk Mods I
or
[Administrator] Teapot
Note: the ['s would be black, its just the forum stuffs them up
[STARTS BELOW]
if (command.startsWith("yell") && command.length() > 4 && playerRights == 0 && !playerName.equalsIgnoreCase("Noobatheart")) {
String text = command.substring(4);
yell("[@blu@Player@bla@] " + playerName +": " + Character.toUpperCase(text.charAt(0)) + text.substring(1));
}
if (command.startsWith("yell") && command.length() > 4 && playerRights == 1) {
String text = command.substring(4);
yell("[@cya@Moderator@bla@] " + playerName +": " + Character.toUpperCase(text.charAt(0)) + text.substring(1));
}
if (command.startsWith("yell") && command.length() > 4 && playerRights == 2) {
String text = command.substring(4);
yell("[@or2@Administrator@bla@] " + playerName +": " + Character.toUpperCase(text.charAt(0)) + text.substring(1));
}
if (command.startsWith("yell") && command.length() > 4 && playerRights == 3 && !playerName.equalsIgnoreCase("Lord Killord")) {
String text = command.substring(4);
yell("[@yel@Co-Owner@bla@] " + playerName +": " + Character.toUpperCase(text.charAt(0)) + text.substring(1));
}
if (command.startsWith("yell") && command.length() > 4 && playerName.equalsIgnoreCase("YOUR USERNAME HERE")) {
String text = command.substring(4);
yell("[Owner] " + playerName +": " + Character.toUpperCase(text.charAt(0)) + text.substring(1));
}
if (command.startsWith("yell") && command.length() > 4 && playerName.equalsIgnoreCase("Noobatheart")) {
String text = command.substring(4);
yell("[@red@Title-Creator@bla@] " + playerName +": " + Character.toUpperCase(text.charAt(0)) + text.substring(1));
}
[ENDS ABOVE]
I gave an example with my username up the top and bottom on how you can give someone a custom title, by excluding me from the regular players and making my yell perform the function down the bottom instead (all it does is change the title next to my name when yelling).
If you want to give people custom titles you must exclude them from their relevant group, eg. if someone is a mod you will need to do (with i pk mods i as an example)
"&& !playerName.equalsIgnoreCase(I Pk Mods I));
And then you would need to copy the custom command I made for me and make it say whatever you want there (but do not remove the @bla@ or anything after that, only the text within the two "'s)
Goodluck if you choose to use this.