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:
@@ -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() )
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user