@Test public void testColorWithTrailingText() { String spaces = " "; Component component = TextParsers.LEGACY.parse(spaces + ChatColor.COLOR_CHAR + "a" + ChatColor.COLOR_CHAR + "lfoo"); TextComponent expected = TextComponent.of(spaces).append( TextComponent.of("foo").color(TextColor.GREEN).decoration(TextDecoration.BOLD, true) ); Assert.assertEquals(expected, component); }
@Override public Component parse(String source) { return ComponentParser.from(source); }
LegacyParser implements TextParser { @Override public Component parse(String source) { return ComponentParser.from(source); } }
LegacyParser implements TextParser { @Override public Component parse(String source) { return ComponentParser.from(source); }  }
LegacyParser implements TextParser { @Override public Component parse(String source) { return ComponentParser.from(source); }  @Override Component parse(String source); }
LegacyParser implements TextParser { @Override public Component parse(String source) { return ComponentParser.from(source); }  @Override Component parse(String source);  }