#3621: Only serialize valid chat colors to "color" component
This commit is contained in:
@@ -63,7 +63,7 @@ public class ComponentStyleSerializer implements JsonSerializer<ComponentStyle>,
|
|||||||
{
|
{
|
||||||
object.addProperty( "obfuscated", style.isObfuscatedRaw() );
|
object.addProperty( "obfuscated", style.isObfuscatedRaw() );
|
||||||
}
|
}
|
||||||
if ( style.hasColor() )
|
if ( style.hasColor() && style.getColor().getColor() != null )
|
||||||
{
|
{
|
||||||
object.addProperty( "color", style.getColor().getName() );
|
object.addProperty( "color", style.getColor().getName() );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user