diff options
author | syeyoung <cyoung06@naver.com> | 2023-01-25 22:33:22 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2023-01-25 22:33:22 +0900 |
commit | 56907f8f7862aa38960c10268b33e6c3afc0f05a (patch) | |
tree | fa23ff089c47eae5f5a0a39c9ffbc86a9801be85 /mod/src/main | |
parent | 4f6fbb0de90e5bd78fe43463dd19cb5b1bbd809e (diff) | |
download | Skyblock-Dungeons-Guide-56907f8f7862aa38960c10268b33e6c3afc0f05a.tar.gz Skyblock-Dungeons-Guide-56907f8f7862aa38960c10268b33e6c3afc0f05a.tar.bz2 Skyblock-Dungeons-Guide-56907f8f7862aa38960c10268b33e6c3afc0f05a.zip |
- support guild join leave messages
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod/src/main')
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatdetectors/ChatDetectorJoinLeave.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatdetectors/ChatDetectorJoinLeave.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatdetectors/ChatDetectorJoinLeave.java index 9de4be0a..b62ea97b 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatdetectors/ChatDetectorJoinLeave.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatdetectors/ChatDetectorJoinLeave.java @@ -37,7 +37,15 @@ public class ChatDetectorJoinLeave implements IChatDetector { 9, username, null )); } - } else if (formatted.endsWith("§6joined the lobby!§r")) { + } else if (formatted.startsWith("§2Guild > §r§6")) { + if (formatted.endsWith("§r§eleft.§r") || formatted.endsWith("§r§ejoined.§r")) { + String strip = TextUtils.stripColor(formatted); + String username = strip.substring(8, strip.indexOf(' ', 8)); + return Collections.singletonList(new ReplacementContext( + 8, username, null + )); + } + } else if (formatted.endsWith("§6joined the lobby!§r")) { String[] messageSplit = TextUtils.stripColor(formatted).split(" "); String oldLeader = null; for (String s : messageSplit) { |