mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +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;
|
c += 32;
|
||||||
}
|
}
|
||||||
|
ChatColor format = ChatColor.getByChar( c );
|
||||||
|
if ( format == null ) continue;
|
||||||
if ( builder.length() > 0 )
|
if ( builder.length() > 0 )
|
||||||
{
|
{
|
||||||
TextComponent old = component;
|
TextComponent old = component;
|
||||||
@ -54,7 +56,6 @@ public class TextComponent extends BaseComponent
|
|||||||
builder = new StringBuilder();
|
builder = new StringBuilder();
|
||||||
components.add( old );
|
components.add( old );
|
||||||
}
|
}
|
||||||
ChatColor format = ChatColor.getByChar( c );
|
|
||||||
switch ( format )
|
switch ( format )
|
||||||
{
|
{
|
||||||
case BOLD:
|
case BOLD:
|
||||||
|
Loading…
Reference in New Issue
Block a user