From a1eba7e2a80abadbc1dabe7ea10ea4974e951228 Mon Sep 17 00:00:00 2001 From: FluxCapacitor2 <31071265+FluxCapacitor2@users.noreply.github.com> Date: Tue, 7 Nov 2023 20:37:57 -0500 Subject: [PATCH] Remove countdown seconds left from sidebar --- .../server/module/gameplay/SidebarModule.kt | 32 ++++++------------- src/main/resources/lang_en.properties | 3 +- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/common/src/main/kotlin/com/bluedragonmc/server/module/gameplay/SidebarModule.kt b/common/src/main/kotlin/com/bluedragonmc/server/module/gameplay/SidebarModule.kt index 78944507..e34672b1 100644 --- a/common/src/main/kotlin/com/bluedragonmc/server/module/gameplay/SidebarModule.kt +++ b/common/src/main/kotlin/com/bluedragonmc/server/module/gameplay/SidebarModule.kt @@ -7,13 +7,13 @@ import com.bluedragonmc.server.event.GameStartEvent import com.bluedragonmc.server.event.GameStateChangedEvent import com.bluedragonmc.server.event.PlayerLeaveGameEvent import com.bluedragonmc.server.module.GameModule -import com.bluedragonmc.server.module.minigame.CountdownModule import com.bluedragonmc.server.utils.GameState import com.bluedragonmc.server.utils.withGradient import kotlinx.coroutines.runBlocking import net.kyori.adventure.text.Component import net.kyori.adventure.text.Component.text -import net.kyori.adventure.text.format.NamedTextColor.* +import net.kyori.adventure.text.format.NamedTextColor.DARK_GRAY +import net.kyori.adventure.text.format.NamedTextColor.RED import net.kyori.adventure.text.format.TextDecoration import net.kyori.adventure.translation.GlobalTranslator import net.minestom.server.entity.Player @@ -82,35 +82,23 @@ class SidebarModule(private val title: String) : GameModule() { fun getStatusSection() = when (module.parent.state) { GameState.SERVER_STARTING -> listOf( getSpacer(), - Component.translatable("module.sidebar.server_starting", YELLOW), + Component.translatable("module.sidebar.server_starting", BRAND_COLOR_PRIMARY_2), getSpacer() ) GameState.WAITING -> listOf( getSpacer(), - Component.translatable("module.sidebar.waiting", YELLOW), + Component.translatable("module.sidebar.waiting", BRAND_COLOR_PRIMARY_2), getSpacer() ) - GameState.STARTING -> { - val countdownTime = module.parent.getModuleOrNull()?.getTimeLeft() - listOf( - getSpacer(), - if (countdownTime != null) { - Component.translatable( - "module.sidebar.starting", - YELLOW, - text(countdownTime) - ) - } else { - Component.translatable("module.sidebar.starting.indeterminant", YELLOW) - }, - getSpacer() - ) - } + GameState.STARTING -> listOf( + getSpacer(), + Component.translatable("module.sidebar.starting", BRAND_COLOR_PRIMARY_2), + getSpacer() + ) - GameState.INGAME -> listOf(getSpacer()) - GameState.ENDING -> listOf(getSpacer()) + GameState.INGAME, GameState.ENDING -> listOf(getSpacer()) } } diff --git a/src/main/resources/lang_en.properties b/src/main/resources/lang_en.properties index 68c25637..4ba53b94 100644 --- a/src/main/resources/lang_en.properties +++ b/src/main/resources/lang_en.properties @@ -221,8 +221,7 @@ module.shop.click_to_purchase=Click to purchase! module.sidebar.server_starting=Server starting... module.sidebar.waiting=Waiting for players... -module.sidebar.starting=Starting in {0}s... -module.sidebar.starting.indeterminant=Starting soon... +module.sidebar.starting=Starting soon... module.respawn.title=YOU DIED module.respawn.subtitle=Respawning in {0} seconds...