aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2023-11-07 00:49:01 +0000
committerGitHub <noreply@github.com>2023-11-07 01:49:01 +0100
commit93e611096d64ffbdef45d01c14afb26a34d6b452 (patch)
treec62768f42f4045f9909ba5f2e82654a7c5e5e74e
parent4954f93cd878d269582ebe6ccc5486a3f8a5918b (diff)
downloadskyhanni-93e611096d64ffbdef45d01c14afb26a34d6b452.tar.gz
skyhanni-93e611096d64ffbdef45d01c14afb26a34d6b452.tar.bz2
skyhanni-93e611096d64ffbdef45d01c14afb26a34d6b452.zip
Update getPlayerName() (#696)
Update getPlayerName() #696
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
index 08344c51b..272f0f7f9 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
@@ -112,7 +112,7 @@ object PartyAPI {
partyMemberListPattern.matchMatcher(message.removeColor()) {
for (name in group("names").split(" ● ")) {
val playerName = name.replace(" ●", "").cleanPlayerName()
- if (playerName == Minecraft.getMinecraft().thePlayer.name) continue
+ if (playerName == LorenzUtils.getPlayerName()) continue
if (!partyMembers.contains(playerName)) partyMembers.add(playerName)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index d4f35c2d8..e6bc74e06 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -204,7 +204,7 @@ object LorenzUtils {
fun getRawPlayerUuid() = Minecraft.getMinecraft().thePlayer.uniqueID
- fun getPlayerName() = Minecraft.getMinecraft().thePlayer.name
+ fun getPlayerName(): String = Minecraft.getMinecraft().thePlayer.name
fun <E> MutableList<List<E>>.addAsSingletonList(text: E) {
add(Collections.singletonList(text))