Skip to content

Commit

Permalink
Fix 1.20.4 coloured chat
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid authored Apr 23, 2024
1 parent bba22a4 commit 6444fea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/me/sisko/left4chat/util/Colors.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static TextComponent format(String text) {
//System.out.println(String.join(", ", texts));

TextComponent finalText = new TextComponent();
ChatColor lastColor = ChatColor.RESET;
ChatColor lastColor = null;

boolean obfuscated = false;
boolean bold = false;
Expand Down Expand Up @@ -92,7 +92,7 @@ public static TextComponent format(String text) {
italic = true;
break;
case 'r':
lastColor = ChatColor.RESET;
lastColor = null;
obfuscated = false;
bold = false;
strikethrough = false;
Expand Down Expand Up @@ -163,7 +163,7 @@ public static TextComponent formatWithPerm(boolean formatPerm, boolean colorPerm
}
} else {
TextComponent formatted = format(message);
formatted.setColor(ChatColor.RESET);
formatted.setColor(null);
return formatted;
}
}
Expand All @@ -189,4 +189,4 @@ public static TextComponent rainbow(String text) {
return txt;
}

}
}

0 comments on commit 6444fea

Please sign in to comment.