aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-08-22 18:06:40 +0900
committersyeyoung <cyong06@naver.com>2021-08-22 18:06:40 +0900
commit93e67ad692e25c0d13d63271a3536c16571aebd0 (patch)
tree41b17194059698a786cbc9e4f8e074203bf13d4c
parent6d74a0685b7088700c71d67f0cafc1c1b60820f2 (diff)
downloadSkyblock-Dungeons-Guide-93e67ad692e25c0d13d63271a3536c16571aebd0.tar.gz
Skyblock-Dungeons-Guide-93e67ad692e25c0d13d63271a3536c16571aebd0.tar.bz2
Skyblock-Dungeons-Guide-93e67ad692e25c0d13d63271a3536c16571aebd0.zip
- Bug Report 211 ([MVP+] xxx joined the [Prefix] lobby!)
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java
index 62e8e0af..a1afd592 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerSocialOptions.java
@@ -65,6 +65,10 @@ public class ChatReplacerSocialOptions implements IChatReplacer {
char c = s.charAt(0);
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-') {
lastValidNickname = i;
+ if (i >= 1) {
+ String str = TextUtils.stripColor(splitInto[i-1]);
+ if (str.startsWith("[") && str.endsWith("]"))break;
+ }
}
}
if (lastValidNickname == -1) return;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java
index 51787951..56430480 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/chatreplacers/ChatReplacerViewProfile.java
@@ -68,6 +68,10 @@ public class ChatReplacerViewProfile implements IChatReplacer {
char c = s.charAt(0);
if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-') {
lastValidNickname = i;
+ if (i >= 1) {
+ String str = TextUtils.stripColor(splitInto[i-1]);
+ if (str.startsWith("[") && str.endsWith("]"))break;
+ }
}
}
if (lastValidNickname == -1) continue;