aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-04-24 08:41:11 +1000
committerGitHub <noreply@github.com>2024-04-24 00:41:11 +0200
commitc2a0e59d760b64b0fe7d1676470ebf931434be6d (patch)
tree9a42a880b175d34c2b2815648fdb8a62f72f4a03 /src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
parent53da6585ecb9b4cc123707d54556b85a8500b599 (diff)
downloadskyhanni-c2a0e59d760b64b0fe7d1676470ebf931434be6d.tar.gz
skyhanni-c2a0e59d760b64b0fe7d1676470ebf931434be6d.tar.bz2
skyhanni-c2a0e59d760b64b0fe7d1676470ebf931434be6d.zip
Feature: Allow party members to request allinvite to be enabled (#1464)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
index 3bd3967be..10739720a 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt
@@ -168,19 +168,16 @@ object PartyAPI {
// party disbanded
disbandedPattern.matchMatcher(message) {
- partyMembers.clear()
- partyLeader = null
+ partyLeft()
}
kickedPattern.matchMatcher(message) {
- partyMembers.clear()
- partyLeader = null
+ partyLeft()
}
if (message == "§eYou left the party." ||
message == "§cThe party was disbanded because all invites expired and the party was empty." ||
message == "§cYou are not currently in a party."
) {
- partyMembers.clear()
- partyLeader = null
+ partyLeft()
}
// party list
@@ -206,4 +203,9 @@ object PartyAPI {
if (playerName == LorenzUtils.getPlayerName()) return
partyMembers.add(playerName)
}
+
+ private fun partyLeft() {
+ partyMembers.clear()
+ partyLeader = null
+ }
}