Skip to content

Commit

Permalink
fix: try clear
Browse files Browse the repository at this point in the history
  • Loading branch information
jimchen5209 committed Jan 2, 2024
1 parent 8ea044c commit d4eda55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/one/oktw/galaxy/proxy/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ class Main : CoroutineScope by CoroutineScope(Dispatchers.Default + SupervisorJo

@Suppress("UnstableApiUsage") proxy.eventManager.register(this, ServerPostConnectEvent::class.java) {
if (it.player.currentServer.get().serverInfo.name == "galaxy-lobby") {
ResourcePackHelper.tryRemoveResourcePack(it.player, "normal_galaxy")
it.player.clearResourcePacks()
ResourcePackHelper.trySendResourcePack(it.player, "lobby")
} else {
// TODO: Check Galaxy Type
if (it.previousServer?.serverInfo?.name != "galaxy-lobby") return@register
ResourcePackHelper.tryRemoveResourcePack(it.player, "lobby")
it.player.clearResourcePacks()
ResourcePackHelper.trySendResourcePack(it.player, "normal_galaxy")
}
}
Expand Down

0 comments on commit d4eda55

Please sign in to comment.