Skip to content
This repository was archived by the owner on Aug 31, 2019. It is now read-only.

Commit 2dd792d

Browse files
committed
Fix NPE from duplicating TranslatableComponent
1 parent 9c1884a commit 2dd792d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

chat/src/main/java/net/md_5/bungee/api/chat/TranslatableComponent.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ public TranslatableComponent(TranslatableComponent original)
4141
{
4242
super( original );
4343
setTranslate( original.getTranslate() );
44+
List<BaseComponent> temp = new ArrayList<BaseComponent>();
4445
for ( BaseComponent baseComponent : original.getWith() )
4546
{
46-
with.add( baseComponent.duplicate() );
47+
temp.add( baseComponent.duplicate() );
4748
}
49+
setWith( temp );
4850
}
4951

5052
/**

0 commit comments

Comments
 (0)