forked from MinecraftUtilities/Backend
line to html now workie
This commit is contained in:
parent
45fb517385
commit
bedde3b0eb
@ -78,13 +78,17 @@ public final class ColorUtils {
|
|||||||
if (nextIsColor) { // Map the current color to its hex code
|
if (nextIsColor) { // Map the current color to its hex code
|
||||||
String color = COLOR_MAP.getOrDefault(Character.toLowerCase(character), "");
|
String color = COLOR_MAP.getOrDefault(Character.toLowerCase(character), "");
|
||||||
builder.append("<span style=\"color:").append(color);
|
builder.append("<span style=\"color:").append(color);
|
||||||
if (character == 'l') { // Bold
|
if (character == 'l') { // Make the char bold
|
||||||
builder.append(";font-weight:bold");
|
builder.append(";font-weight:bold");
|
||||||
}
|
}
|
||||||
builder.append("\">");
|
builder.append("\">");
|
||||||
nextIsColor = false;
|
nextIsColor = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (character == ' ') { // Preserve space character
|
||||||
|
builder.append(" ");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
builder.append(character); // Append the char...
|
builder.append(character); // Append the char...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user