Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-08 17:20:20 +01:00
Add check to fix NONE team color causing an NPE (#1602)
Dieser Commit ist enthalten in:
Ursprung
0215c383b0
Commit
eb687e6638
@ -234,6 +234,10 @@ public class MessageTranslator {
|
|||||||
* @return The chat color character
|
* @return The chat color character
|
||||||
*/
|
*/
|
||||||
public static String toChatColor(TeamColor teamColor) {
|
public static String toChatColor(TeamColor teamColor) {
|
||||||
|
if (teamColor.equals(TeamColor.NONE)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
NamedTextColor textColor = NamedTextColor.NAMES.value(teamColor.name().toLowerCase());
|
NamedTextColor textColor = NamedTextColor.NAMES.value(teamColor.name().toLowerCase());
|
||||||
if (textColor != null) {
|
if (textColor != null) {
|
||||||
return getColor(textColor);
|
return getColor(textColor);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren