From 2591eaa363d4c97817fce05988009b6d7d31149a Mon Sep 17 00:00:00 2001 From: Inglett Date: Thu, 18 Jan 2024 15:03:52 -0600 Subject: fix another garden bug and crash --- src/main/kotlin/com/dulkirfabric/util/TablistUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++ } -- cgit