This commit is contained in:
2024-12-03 17:17:29 +01:00
parent 677eb4137a
commit 19a4d0e93a
8 changed files with 79 additions and 79 deletions
@@ -81,7 +81,7 @@ object TNTLeagueGame {
blueTeam.start()
redTeam.start()
message.broadcast("gameStarted")
message.broadcast("GAME_STARTED")
val tnt = ItemStack(Material.TNT)
@@ -106,7 +106,7 @@ object TNTLeagueGame {
}
if (gameTimeRemaining % 300 == 0) {
message.broadcast("timeRemaining", (gameTimeRemaining / 60))
message.broadcast("TIME_REMAINING", (gameTimeRemaining / 60))
plugin.server.onlinePlayers.forEach { it.playSound(Sound.sound(org.bukkit.Sound.BLOCK_NOTE_BLOCK_PLING.key, Sound.Source.MASTER, 1f, 1f)) }
}
}, 20, 20)
@@ -124,7 +124,7 @@ object TNTLeagueGame {
it.playSound(Sound.sound(org.bukkit.Sound.ENTITY_ENDER_DRAGON_DEATH.key, Sound.Source.MASTER, 1f, 1f))
}
message.broadcast("gameEnded")
message.broadcast("GAME_ENDED")
spawnerTask.cancel()
@@ -135,7 +135,7 @@ object TNTLeagueGame {
plugin.server.shutdown()
}
message.broadcast("shutdown", shutdown)
message.broadcast("SHUTDOWN", shutdown)
shutdown--
}, 20, 20)
@@ -154,7 +154,7 @@ object TNTLeagueGame {
state = GameState.STARTING
var countdown = TNTLeagueConfig.config.startDelay
message.broadcast("gameStarting", countdown.toString())
message.broadcast("GAME_STARTING", countdown.toString())
task = plugin.server.scheduler.scheduleSyncRepeatingTask(plugin, {
plugin.server.onlinePlayers.forEach { it.playSound(Sound.sound(org.bukkit.Sound.ENTITY_EXPERIENCE_ORB_PICKUP.key, Sound.Source.MASTER, 1f, 1f)) }
if (--countdown == 0) {
@@ -195,7 +195,7 @@ object TNTLeagueGame {
fun win(tntLeagueTeam: TNTLeagueTeam, reason: WinReason) {
if (state != GameState.RUNNING) return
end()
plugin.server.onlinePlayers.forEach { message.send("teamWin", it, message.parse(tntLeagueTeam.name, it).colorByTeam(tntLeagueTeam)) }
plugin.server.onlinePlayers.forEach { message.send("TEAM_WIN", it, message.parse(tntLeagueTeam.name, it).colorByTeam(tntLeagueTeam)) }
statistic(tntLeagueTeam, reason)
explode(tntLeagueTeam.opposite)
}
@@ -203,7 +203,7 @@ object TNTLeagueGame {
fun draw(reason: WinReason) {
if (state != GameState.RUNNING) return
end()
message.broadcast("draw")
message.broadcast("DRAW")
statistic(null, reason)
}