Skip to content

Commit c27607e

Browse files
committed
chore(bukkit): update health check warning for unreachable servers
1 parent 685f497 commit c27607e

File tree

1 file changed

+9
-9
lines changed
  • sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/health

1 file changed

+9
-9
lines changed

sayanvanish-bukkit/src/main/kotlin/org/sayandev/sayanvanish/bukkit/health/HealthCache.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ object HealthCache {
7878
}
7979
}
8080

81+
val unreachableServers = servers.filter { it.id == null }
82+
if (unreachableServers.isNotEmpty()) {
83+
sender.sendComponent("<red>Found servers that are unreachable.")
84+
for (server in unreachableServers) {
85+
sender.sendComponent("<gray> - <yellow>${server.name}")
86+
}
87+
sender.sendComponent("<red>These server either don't have SayanVanish installed or is offline or there's no player on this servers. SayanVanish can only check servers which have player on them")
88+
}
89+
8190
val reachableServers = servers.filter { it.id != null }
8291
val duplicateServers = reachableServers.groupBy { it.id }.filter { it.value.size > 1 }
8392
for (duplicateServer in duplicateServers) {
@@ -96,15 +105,6 @@ object HealthCache {
96105
}
97106
sender.sendComponent("<red>SQLite will not sync data between servers. Make sure to change the database method to MySQL or Redis.")
98107
}
99-
100-
val unrechableServers = reachableServers.filter { it.id == null }
101-
if (unrechableServers.isNotEmpty()) {
102-
sender.sendComponent("<red>Found servers that are unreachable.")
103-
for (server in unrechableServers) {
104-
sender.sendComponent("<gray> - <yellow>${server.name}")
105-
}
106-
sender.sendComponent("<red>These server either don't have SayanVanish installed or is offline.")
107-
}
108108
} else {
109109
sender.sendComponent("<red>No servers found.")
110110
}

0 commit comments

Comments
 (0)