Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String getLastColors(String input){
- String result = "";
- int length = input.length();
- for (int index = length - 1; index > -1; index--){
- char section = input.charAt(index);
- if ((section == 'ยง' || section == '&') && (index < length - 1)){
- char c = input.charAt(index + 1);
- ChatColor color = ChatColor.getByChar(c);
- if (color != null){
- result = color.toString() + result;
- if ((color.equals(ChatColor.RESET))){
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement