From 93e611096d64ffbdef45d01c14afb26a34d6b452 Mon Sep 17 00:00:00 2001 From: Walker Selby Date: Tue, 7 Nov 2023 00:49:01 +0000 Subject: Update getPlayerName() (#696) Update getPlayerName() #696 --- src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt | 2 +- src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 MutableList>.addAsSingletonList(text: E) { add(Collections.singletonList(text)) -- cgit