Add ranking system and /ranking command

Introduce a ranking system: add Rank enum and RankingManager enhancements (isRankingEnabled toggle, getRank(), RR change handling, rank-up/down detection and player notifications with titles/sounds). Add a new /ranking admin command (toggle, status, rank) with tab completion and register it in plugin startup. Surface player rank on the scoreboard (ScoreboardManager) and add related language entries and plugin.yml permission/command metadata. Logging updated to include ranked state.
This commit is contained in:
TDSTOS
2026-04-03 22:28:56 +02:00
parent ab976cc2a4
commit 7b6557122b
7 changed files with 339 additions and 18 deletions

View File

@@ -2,6 +2,7 @@ package club.mcscrims.speedhg
import club.mcscrims.speedhg.command.KitCommand
import club.mcscrims.speedhg.command.LeaderboardCommand
import club.mcscrims.speedhg.command.RankingCommand
import club.mcscrims.speedhg.command.TimerCommand
import club.mcscrims.speedhg.config.CustomGameManager
import club.mcscrims.speedhg.config.CustomGameSettings
@@ -149,6 +150,12 @@ class SpeedHG : JavaPlugin() {
tabCompleter = timerCommand
}
val rankingCommand = RankingCommand( this )
getCommand( "ranking" )?.apply {
setExecutor( rankingCommand )
tabCompleter = rankingCommand
}
getCommand( "leaderboard" )?.setExecutor( LeaderboardCommand() )
}