mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-11-24 15:58:59 +01:00
Add check to fix NONE team color causing an NPE (#1602)
This commit is contained in:
parent
0215c383b0
commit
eb687e6638
1 changed files with 4 additions and 0 deletions
|
@ -234,6 +234,10 @@ public class MessageTranslator {
|
|||
* @return The chat color character
|
||||
*/
|
||||
public static String toChatColor(TeamColor teamColor) {
|
||||
if (teamColor.equals(TeamColor.NONE)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
NamedTextColor textColor = NamedTextColor.NAMES.value(teamColor.name().toLowerCase());
|
||||
if (textColor != null) {
|
||||
return getColor(textColor);
|
||||
|
|
Loading…
Reference in a new issue