diff options
author | Vixid <52578495+Vixid1@users.noreply.github.com> | 2022-11-04 16:35:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 17:35:23 +0100 |
commit | 5a30d9142f73edf539343d51e7d69ab7a225c7a2 (patch) | |
tree | 2a556eb4344c52615c333a53dd39681356f2e51d /src | |
parent | f26c10e527cc4588182290cf7a6484576cefe08f (diff) | |
download | NotEnoughUpdates-5a30d9142f73edf539343d51e7d69ab7a225c7a2.tar.gz NotEnoughUpdates-5a30d9142f73edf539343d51e7d69ab7a225c7a2.tar.bz2 NotEnoughUpdates-5a30d9142f73edf539343d51e7d69ab7a225c7a2.zip |
Fixes social controls in party and guild chats (#422)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index 57f24370..cac6990f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -2009,12 +2009,12 @@ public class Utils { // If the first character is a square bracket the user has a rank // So we get the username from the space after the closing square bracket (end of their rank) if (username.charAt(0) == '[') { - username = username.substring(unformattedText.indexOf(" ") + 2); + username = username.substring(username.indexOf(" ") + 1); } // If we still get any square brackets it means the user was talking in guild chat with a guild rank // So we get the username up to the space before the guild rank if (username.contains("[") || username.contains("]")) { - username = username.substring(0, unformattedText.indexOf(" ")); + username = username.substring(0, username.indexOf(" ")); } return username; } |