#3621: Only serialize valid chat colors to "color" component

This commit is contained in:
Rothes 2024-03-31 09:51:04 +11:00 committed by md_5
parent 82684c7b6b
commit f224787222
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -63,7 +63,7 @@ public class ComponentStyleSerializer implements JsonSerializer<ComponentStyle>,
{
object.addProperty( "obfuscated", style.isObfuscatedRaw() );
}
if ( style.hasColor() )
if ( style.hasColor() && style.getColor().getColor() != null )
{
object.addProperty( "color", style.getColor().getName() );
}