diff options
author | Walker Selby <git@walkerselby.com> | 2023-11-07 00:49:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 01:49:01 +0100 |
commit | 93e611096d64ffbdef45d01c14afb26a34d6b452 (patch) | |
tree | c62768f42f4045f9909ba5f2e82654a7c5e5e74e /src | |
parent | 4954f93cd878d269582ebe6ccc5486a3f8a5918b (diff) | |
download | skyhanni-93e611096d64ffbdef45d01c14afb26a34d6b452.tar.gz skyhanni-93e611096d64ffbdef45d01c14afb26a34d6b452.tar.bz2 skyhanni-93e611096d64ffbdef45d01c14afb26a34d6b452.zip |
Update getPlayerName() (#696)
Update getPlayerName() #696
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 2 |
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)) |