#2255: Fix ComponentBuilder clone constructor
* Fix ComponentBuilder clone constructor #2255 * Fix appending text to a ComponentBuilder if current is not a TextComponent
This commit is contained in:
@@ -13,6 +13,15 @@ import org.junit.Test;
|
||||
public class ComponentsTest
|
||||
{
|
||||
|
||||
@Test
|
||||
public void testBuilderClone()
|
||||
{
|
||||
ComponentBuilder builder = new ComponentBuilder("Hel").color(ChatColor.RED).append("lo").color(ChatColor.DARK_RED);
|
||||
ComponentBuilder cloned = new ComponentBuilder( builder );
|
||||
|
||||
Assert.assertEquals( TextComponent.toLegacyText( builder.create() ), TextComponent.toLegacyText( cloned.create() ) );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBuilderAppend()
|
||||
{
|
||||
|
Reference in New Issue
Block a user