fix npe in /myinfo

This commit is contained in:
speed 2020-07-18 19:51:17 -04:00 committed by GitHub
parent 4f276ec78e
commit 588a2f1eba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -590,6 +590,8 @@ public class FUtil
}
public static String colorize(String string)
{
if (string != null)
{
Matcher matcher = Pattern.compile("&#[a-f0-9A-F]{6}").matcher(string);
while (matcher.find())
@ -599,6 +601,7 @@ public class FUtil
}
string = ChatColor.translateAlternateColorCodes('&', string);
}
return string;
}