mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +01:00
Fix NPE when converting invalid color character from legacy text
This commit is contained in:
parent
92ebce2ec6
commit
c29676e4fc
@ -42,6 +42,8 @@ public class TextComponent extends BaseComponent
|
||||
{
|
||||
i++;
|
||||
c = message.charAt( i );
|
||||
ChatColor format = ChatColor.getByChar( c );
|
||||
if ( format == null ) continue;
|
||||
if ( c >= 'A' && c <= 'Z' )
|
||||
{
|
||||
c += 32;
|
||||
@ -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