aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
index dd806495e..638c2e0b8 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt
@@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.ProfileJoinEvent
import at.hannibal2.skyhanni.events.TabListUpdateEvent
import at.hannibal2.skyhanni.features.bingo.BingoAPI
+import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
@@ -67,6 +68,13 @@ class HypixelData {
"playeramount.guesting",
"^\\s*(?:§.)*Guests (?:§.)*\\((?<amount>\\d+)\\)\\s*$"
)
+ /**
+ * REGEX-TEST: §r§b§lParty §r§f(4)
+ */
+ private val dungeonPartyAmountPattern by patternGroup.pattern(
+ "playeramount.dungeonparty",
+ "^\\s*(?:§.)+Party (?:§.)+\\((?<amount>\\d+)\\)\\s*$"
+ )
private val soloProfileAmountPattern by patternGroup.pattern(
"solo.profile.amount",
"^\\s*(?:§.)*Island\\s*$"
@@ -159,11 +167,14 @@ class HypixelData {
fun getPlayersOnCurrentServer(): Int {
var amount = 0
- val playerPatternList = listOf(
+ val playerPatternList = mutableListOf(
playerAmountPattern,
playerAmountCoopPattern,
- playerAmountGuestingPattern
+ playerAmountGuestingPattern,
)
+ if (DungeonAPI.inDungeon()) {
+ playerPatternList.add(dungeonPartyAmountPattern)
+ }
out@ for (pattern in playerPatternList) {
for (line in TabListData.getTabList()) {