Merge branch 'development'

This commit is contained in:
Brianna 2020-07-17 18:56:20 -05:00
commit 8af7fe2fd4
2 changed files with 3 additions and 4 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "SongodaCore"
path: "/builds/$CI_PROJECT_PATH"
version: "2.3.42"
version: "2.3.43"
build:
stage: build

View File

@ -49,7 +49,6 @@ public class ChatMessage {
} else if (colorChar == '&')
color = new ColorContainer(ColorCode.getByChar(match1.charAt(0)));
}
if (color != null && color.getColorCode() == ColorCode.RESET) color = null;
Pattern subPattern = Pattern.compile("(.*?)(?=\\&(o|m|n|l|k)|$)");
Matcher subMatcher = subPattern.matcher(match1);
@ -58,9 +57,9 @@ public class ChatMessage {
String match2 = subMatcher.group(1);
if (match2.length() == 0) continue;
ColorCode code = ColorCode.getByChar(match2.charAt(0));
if (code != null)
if (code != null && code != ColorCode.RESET)
stackedCodes.add(code);
if (color != null)
if (color != null || code != ColorCode.RESET)
match2 = match2.substring(1);
if (match2.length() == 0) continue;
addMessage(match2, color, stackedCodes);