aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/utils/TablistUtils.kt
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-06-05 13:54:08 -0500
committeringlettronald <inglettronald@gmail.com>2023-06-05 13:54:08 -0500
commitb220e76e12724a91507e894ac018e1ad6b695c9a (patch)
treeeb1447e419094e71cd39bfd708869ffa091a6864 /src/main/kotlin/dulkirmod/utils/TablistUtils.kt
parent44daa2779ae9e9462af9b0c19cd6838bf94d165d (diff)
downloadDulkirMod-b220e76e12724a91507e894ac018e1ad6b695c9a.tar.gz
DulkirMod-b220e76e12724a91507e894ac018e1ad6b695c9a.tar.bz2
DulkirMod-b220e76e12724a91507e894ac018e1ad6b695c9a.zip
archer highlight impl
Diffstat (limited to 'src/main/kotlin/dulkirmod/utils/TablistUtils.kt')
-rw-r--r--src/main/kotlin/dulkirmod/utils/TablistUtils.kt9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/utils/TablistUtils.kt b/src/main/kotlin/dulkirmod/utils/TablistUtils.kt
index 8bad6be..8ecc771 100644
--- a/src/main/kotlin/dulkirmod/utils/TablistUtils.kt
+++ b/src/main/kotlin/dulkirmod/utils/TablistUtils.kt
@@ -3,6 +3,7 @@ package dulkirmod.utils
import com.google.common.collect.ComparisonChain
import com.google.common.collect.Ordering
import dulkirmod.DulkirMod.Companion.mc
+import dulkirmod.config.DulkirConfig
import net.minecraft.client.network.NetworkPlayerInfo
import net.minecraft.world.WorldSettings
@@ -18,6 +19,7 @@ object TabListUtils {
var gardenMilestone: String = ""
var timeTillNextVisitor: String = ""
var numVisitors: Int = 0
+ var archerName: String = ""
private val playerInfoOrdering = object : Ordering<NetworkPlayerInfo>() {
override fun compare(p_compare_1_: NetworkPlayerInfo?, p_compare_2_: NetworkPlayerInfo?): Int {
@@ -84,9 +86,16 @@ object TabListUtils {
numVisitors = line.substring(11, 12).toInt() // TODO: FIX WHEN THEY ADD THE TENTH VISITOR
numVisitorsFlag = true
}
+ line.contains("(Archer") -> {
+ val strArr = line.split(" ")
+ archerName = strArr[1]
+ }
}
}
+ if (area != "Dungeon") {
+ archerName = ""
+ }
if (area != "Crimson Isle") {
explosivity = false
}