How to make a command for the custom title? I added this with no errors.
Code:
/**
* Custom title's
*/
private String i;
private boolean hasCustomTitle;
/**
* Set's the title of a player using the parameters AcxxX
*
* Param AcxxX
* - The String of the title
*/
public void setCustomTitle(String AcxxX) {
this.i = getTitleColor() + "" + AcxxX + "</col>";
this.hasCustomTitle = true;
}
public String hex;
public void setTitleColor(String color) {
if (color.length() != 6) {
return;
} else if (color.contains("_")) {
return;
} else if (Utils.containsInvalidCharacter(color)) {
return;
}
this.hex = "<col=" + color + ">";
}
public String getTitleColor() {
// Doesn't have a custom color
return hex == null ? "<col=C12006>" : hex;
}
public String getCustomTitle() {
return hasCustomTitle ? i : null;
}
public boolean hasCustomTitle() {
return hasCustomTitle;
}
public void resetCustomTitle() {
this.i = null;
this.hasCustomTitle = false;
}