Skip to content

Commit 982b5c4

Browse files
committed
fix: empty tablsit group
1 parent cfec6f8 commit 982b5c4

File tree

1 file changed

+13
-14
lines changed
  • proxy-bungeecord/src/main/kotlin/app/simplecloud/plugin/proxy/bungeecord/handler

1 file changed

+13
-14
lines changed

proxy-bungeecord/src/main/kotlin/app/simplecloud/plugin/proxy/bungeecord/handler/TabListHandler.kt

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package app.simplecloud.plugin.proxy.bungeecord.handler
22

33
import app.simplecloud.plugin.proxy.bungeecord.ProxyBungeeCordPlugin
4-
import app.simplecloud.plugin.proxy.shared.config.tablis.TabList
5-
import app.simplecloud.plugin.proxy.shared.config.tablis.TabListGroup
64
import net.md_5.bungee.api.connection.ProxiedPlayer
75
import net.md_5.bungee.api.scheduler.ScheduledTask
86
import java.util.concurrent.TimeUnit
@@ -36,8 +34,8 @@ class TabListHandler(
3634
}
3735

3836
fun updateTabListForPlayer(player: ProxiedPlayer) {
39-
if (player.server == null) return;
40-
if (player.server.info == null) return;
37+
if (player.server == null) return
38+
if (player.server.info == null) return
4139

4240
val configuration = plugin.proxyPlugin.tabListConfiguration
4341
val serviceName = player.server.info.name
@@ -61,16 +59,17 @@ class TabListHandler(
6159
}
6260
}
6361

64-
if (tabListGroup == null) {
65-
tabListGroup = TabListGroup(
66-
"noValuedGroupOrServiceConfigurationsFround",
67-
listOf(
68-
TabList(
69-
listOf("<red>No configuration found for this service"),
70-
listOf("<red>Please check your configuration file from the proxy plugin in the plugins folder"),
71-
)
72-
)
73-
)
62+
if (tabListGroup == null || tabListGroup.tabLists.isEmpty()) {
63+
// tabListGroup = TabListGroup(
64+
// "noValuedGroupOrServiceConfigurationsFround",
65+
// listOf(
66+
// TabList(
67+
// listOf("<red>No configuration found for this service"),
68+
// listOf("<red>Please check your configuration file from the proxy plugin in the plugins folder"),
69+
// )
70+
// )
71+
// )
72+
return
7473
}
7574

7675
if (tabListGroup.tabLists.size <= tabListIndex.getOrDefault(tabListGroup.groupOrService, 0) + 1)

0 commit comments

Comments
 (0)