aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInglett <inglettronald@gmail.com>2024-01-18 15:03:52 -0600
committerInglett <inglettronald@gmail.com>2024-01-18 15:03:52 -0600
commit2591eaa363d4c97817fce05988009b6d7d31149a (patch)
treec3e919cee0328c7f68049ca83fb319514c54e9ba
parent2249182df19085e14c5bd29d466331228677ad3c (diff)
downloadDulkirMod-Fabric-2591eaa363d4c97817fce05988009b6d7d31149a.tar.gz
DulkirMod-Fabric-2591eaa363d4c97817fce05988009b6d7d31149a.tar.bz2
DulkirMod-Fabric-2591eaa363d4c97817fce05988009b6d7d31149a.zip
fix another garden bug and crash
-rw-r--r--src/main/kotlin/com/dulkirfabric/util/TablistUtils.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/util/TablistUtils.kt b/src/main/kotlin/com/dulkirfabric/util/TablistUtils.kt
index 38c62a7..b731340 100644
--- a/src/main/kotlin/com/dulkirfabric/util/TablistUtils.kt
+++ b/src/main/kotlin/com/dulkirfabric/util/TablistUtils.kt
@@ -51,7 +51,7 @@ object TablistUtils {
persistentInfo.nextVisitorTime = result.groupValues[1]
var index = tablist!!.indexOf(it) + 1
var visitors = 0
- while (tablist!!.get(index).displayName?.string != "") {
+ while (index < tablist!!.size && tablist!![index].displayName?.string != "" && visitors < 5) {
index++
visitors++
}