#3621: Only serialize valid chat colors to "color" component
This commit is contained in:
parent
82684c7b6b
commit
f224787222
@ -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() );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user