mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Fix custom colors not showing in line wrapped messages.
This commit is contained in:
parent
8ace49f9ed
commit
f28582a1e9
@ -2675,16 +2675,14 @@ Next: continue;
|
||||
if ( index != -1 ) {
|
||||
if ( index < lines[lines.Count - 1].Length - 1 ) {
|
||||
char next = lines[lines.Count - 1][index + 1];
|
||||
if ( "0123456789abcdef".IndexOf(next) != -1 ) { color = "&" + next; }
|
||||
if ( Colors.MapColor(ref next) ) color = "&" + next;
|
||||
if ( index == lines[lines.Count - 1].Length - 1 ) {
|
||||
lines[lines.Count - 1] = lines[lines.Count - 1].Substring(0, lines[lines.Count - 1].Length - 2);
|
||||
}
|
||||
}
|
||||
else if ( message.Length != 0 ) {
|
||||
char next = message[0];
|
||||
if ( "0123456789abcdef".IndexOf(next) != -1 ) {
|
||||
color = "&" + next;
|
||||
}
|
||||
if ( Colors.MapColor(ref next) ) color = "&" + next;
|
||||
lines[lines.Count - 1] = lines[lines.Count - 1].Substring(0, lines[lines.Count - 1].Length - 1);
|
||||
message = message.Substring(1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user