Code:
case "settitle":
if (cmd.length != 3)
return false;
String hexColor = cmd[1]
String customTitle = cmd[2]
if (hexColor.length != 6) {
player.getDialogueManager().startDialogue("SimpleMessage", "The HEX yell color you wanted to pick cannot be longer and shorter then 6.");
return false;
}
if ((Utils.containsInvalidCharacter(hexColor) || hexColor.contains("_")) {
player.getDialogueManager().startDialogue("SimpleMessage", "The requested title color can only contain numeric and regular characters.");
return false;
}
if(customTitle.length() > 8) {
player.getDialogueManager().startDialogue("SimpleMessage", "Titles are limted to eight characters due to spam.");
return false;
}
if(Utils.containsInvalidCharacter(customTitle) || customTitle.contains("_") ||
customTitle.contains("0") ||
customTitle.contains("1") ||
customTitle.contains("2") ||
customTitle.contains("3") ||
customTitle.contains("4") ||
customTitle.contains("5") ||
customTitle.contains("6") ||
customTitle.contains("7") ||
customTitle.contains("8") ||
customTitle.contains("9") ||
customTitle.contains("9") ||
customTitle.toLowerCase().contains("owner") ||
customTitle.toLowerCase().contains("admin") ||
customTitle.toLowerCase().contains("mod") ||
customTitle.contains("10")) {
player.getDialogueManager().startDialogue("SimpleMessage", "You have entered invaild characters or word.");
return false;
}
else
player.setTitle(customTitle);
player.settitlecolor(hexColor);
player.getAppearence().setTitle(900);
return true;
Post any errors below