mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-26 10:37:46 +01:00
Merge pull request #935 from yawkat/fix-legacy-convert-npe
Fix NPE when converting invalid color character from legacy text (Fixes #934)
This commit is contained in:
commit
a8584f81ed
@ -46,6 +46,8 @@ public class TextComponent extends BaseComponent
|
||||
{
|
||||
c += 32;
|
||||
}
|
||||
ChatColor format = ChatColor.getByChar( c );
|
||||
if ( format == null ) continue;
|
||||
if ( builder.length() > 0 )
|
||||
{
|
||||
TextComponent old = component;
|
||||
@ -54,7 +56,6 @@ public class TextComponent extends BaseComponent
|
||||
builder = new StringBuilder();
|
||||
components.add( old );
|
||||
}
|
||||
ChatColor format = ChatColor.getByChar( c );
|
||||
switch ( format )
|
||||
{
|
||||
case BOLD:
|
||||
|
Loading…
Reference in New Issue
Block a user