Add podium ceremony and rank enhancements
Introduce a PodiumManager to run an end-of-round podium ceremony and integrate it into the lifecycle. Key changes: - Add PodiumManager (new): builds podium columns, teleports and freezes top-3 players, spawns TextDisplay entities, posts staggered announcements, and runs a ranked firework show; includes cleanup to remove entities, blocks and cancel tasks. - SpeedHG: initialize podiumManager and call podiumManager.cleanup() on disable. - GameManager: trigger plugin.podiumManager.launch(winnerUUID) shortly after the win announcement. - RankingManager: track elimination order during the round and expose getEliminationOrder() to determine placements. - Rank: add sub-tier logic (I/II/III), firework color, and helper methods to produce formatted MiniMessage rank tags/components; improve cached component/prefix handling. - ScoreboardManager: use Rank.getFormattedRankName(...) to show the formatted rank with sub-tier on scoreboards. Purpose: provide a richer end-of-round experience (visuals, sounds, fireworks) and accurate top-3 determination using elimination order while adding rank sub-tiering and formatted rank output for UI elements.
This commit is contained in:
@@ -10,6 +10,7 @@ import club.mcscrims.speedhg.config.LanguageManager
|
||||
import club.mcscrims.speedhg.database.DatabaseManager
|
||||
import club.mcscrims.speedhg.database.StatsManager
|
||||
import club.mcscrims.speedhg.game.GameManager
|
||||
import club.mcscrims.speedhg.game.PodiumManager
|
||||
import club.mcscrims.speedhg.game.modules.AntiRunningManager
|
||||
import club.mcscrims.speedhg.gui.listener.MenuListener
|
||||
import club.mcscrims.speedhg.kit.KitManager
|
||||
@@ -69,6 +70,9 @@ class SpeedHG : JavaPlugin() {
|
||||
lateinit var rankingManager: RankingManager
|
||||
private set
|
||||
|
||||
lateinit var podiumManager: PodiumManager
|
||||
private set
|
||||
|
||||
override fun onLoad()
|
||||
{
|
||||
instance = this
|
||||
@@ -101,6 +105,7 @@ class SpeedHG : JavaPlugin() {
|
||||
languageManager = LanguageManager( this )
|
||||
gameManager = GameManager( this )
|
||||
rankingManager = RankingManager( this )
|
||||
podiumManager = PodiumManager( this )
|
||||
antiRunningManager = AntiRunningManager( this )
|
||||
scoreboardManager = ScoreboardManager( this )
|
||||
kitManager = KitManager( this )
|
||||
@@ -116,6 +121,7 @@ class SpeedHG : JavaPlugin() {
|
||||
|
||||
override fun onDisable()
|
||||
{
|
||||
podiumManager.cleanup()
|
||||
if ( ::statsManager.isInitialized ) statsManager.shutdown()
|
||||
if ( ::databaseManager.isInitialized ) databaseManager.disconnect()
|
||||
kitManager.clearAll()
|
||||
|
||||
Reference in New Issue
Block a user