@Test public void testJsonSerialisation() { TranslatableComponent testComponent = new TranslatableComponent( "Test string with %s placeholder", "a" ); String jsonString = ComponentSerializer.toString( testComponent ); BaseComponent[] baseComponents = ComponentSerializer.parse( jsonString ); Assert.assertEquals( "Test string with a placeholder", TextComponent.toPlainText( baseComponents ) ); Assert.assertEquals( "§fTest string with §fa§f placeholder", TextComponent.toLegacyText( baseComponents ) ); }
@Override protected void toPlainText(StringBuilder builder) { convert( builder, false ); super.toPlainText( builder ); }
TranslatableComponent extends BaseComponent { @Override protected void toPlainText(StringBuilder builder) { convert( builder, false ); super.toPlainText( builder ); } }
TranslatableComponent extends BaseComponent { @Override protected void toPlainText(StringBuilder builder) { convert( builder, false ); super.toPlainText( builder ); } TranslatableComponent(TranslatableComponent original);  TranslatableComponent(String translate, Object... with); }
TranslatableComponent extends BaseComponent { @Override protected void toPlainText(StringBuilder builder) { convert( builder, false ); super.toPlainText( builder ); } TranslatableComponent(TranslatableComponent original);  TranslatableComponent(String translate, Object... with); @Override TranslatableComponent duplicate(); void setWith(List<BaseComponent> components); void addWith(String text); void addWith(BaseComponent component); }
TranslatableComponent extends BaseComponent { @Override protected void toPlainText(StringBuilder builder) { convert( builder, false ); super.toPlainText( builder ); } TranslatableComponent(TranslatableComponent original);  TranslatableComponent(String translate, Object... with); @Override TranslatableComponent duplicate(); void setWith(List<BaseComponent> components); void addWith(String text); void addWith(BaseComponent component);  }