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:
		| @@ -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: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 thinkofdeath
					thinkofdeath