mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 10:07:38 +01:00
Fix client crash when an empty message is sent using TextComponent.fromLegacyText
This commit is contained in:
parent
0d7cd78901
commit
b0a8371570
@ -110,6 +110,12 @@ public class TextComponent extends BaseComponent
|
||||
component.setText( builder.toString() );
|
||||
components.add( component );
|
||||
}
|
||||
|
||||
//The client will crash if the array is empty
|
||||
if ( components.size() == 0 ) {
|
||||
components.add( new TextComponent( "" ) );
|
||||
}
|
||||
|
||||
return components.toArray( new BaseComponent[components.size()] );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user