Add timer command, recraft module & recipes
Introduce a /timer admin command with tab completion (speedhg.admin.timer) and a parseTimeToSeconds utility; add CommandSender.sendMsg extension and language strings. Add RecraftManager module that enforces a configurable recraft-nerf (reduces extra recraft points for alive players) and starts from GameManager; wire the new module into GameManager. Register mushroom-stew shapeless recipes for cocoa and cactus in plugin startup and tidy command registration. Update plugin.yml with permission/command entries and adjust imports as needed.
This commit is contained in:
@@ -3,6 +3,7 @@ package club.mcscrims.speedhg.game
|
||||
import club.mcscrims.speedhg.SpeedHG
|
||||
import club.mcscrims.speedhg.game.modules.FeastManager
|
||||
import club.mcscrims.speedhg.game.modules.PitManager
|
||||
import club.mcscrims.speedhg.game.modules.RecraftManager
|
||||
import club.mcscrims.speedhg.util.sendMsg
|
||||
import club.mcscrims.speedhg.util.trans
|
||||
import net.kyori.adventure.title.Title
|
||||
@@ -45,6 +46,7 @@ class GameManager(
|
||||
|
||||
val feastManager = FeastManager( plugin )
|
||||
val pitManager = PitManager( plugin )
|
||||
val recraftManager = RecraftManager( plugin )
|
||||
|
||||
init {
|
||||
plugin.server.pluginManager.registerEvents( this, plugin )
|
||||
@@ -52,6 +54,8 @@ class GameManager(
|
||||
gameTask = Bukkit.getScheduler().runTaskTimer( plugin, { ->
|
||||
gameLoop()
|
||||
}, 20L, 20L )
|
||||
|
||||
recraftManager.startRunnable()
|
||||
}
|
||||
|
||||
private var lobbyIdleCount: Int = 0
|
||||
|
||||
Reference in New Issue
Block a user