Basically trying to get a players username in Minecraft and then splitting it down to just their name.
I have split the first part of their IGN but I need help with removing everything past the second color code.
if (a != null && firstTwo(a).equals("§c")) {
if (staffMember.contains(a))
return;
//staffMember.add(a);
String splitName = a.replace("§c", "");
if (a.contains("[")) {
// Code i need help with. I want to remove everything after the username §c...
// EX. Username§c [tag]
}
ChatUtils.message("" + splitName);
updateStaff(splitName);
}