refactor: time var
This commit is contained in:
parent
bd41cacdb9
commit
c810cc0aaf
4 changed files with 4 additions and 4 deletions
|
@ -50,7 +50,7 @@ class RunnerDragon : JavaPlugin() {
|
|||
|
||||
var STATE = GameState.GAME
|
||||
var DEAD_COWS = 0
|
||||
var TIME = 0
|
||||
var ELAPSED_TIME = 0
|
||||
|
||||
var SPAWN_HEIGHT = 300
|
||||
var TEAM_LOCK = false
|
||||
|
@ -116,7 +116,7 @@ class RunnerDragon : JavaPlugin() {
|
|||
Bukkit.getScheduler().cancelTasks(this)
|
||||
TIMER_TASK?.taskId?.let { Bukkit.getScheduler().cancelTask(it) }
|
||||
GRACE_PERIOD_TASK?.taskId?.let { Bukkit.getScheduler().cancelTask(it) }
|
||||
TIME = 0
|
||||
ELAPSED_TIME = 0
|
||||
DEAD_COWS = 0
|
||||
|
||||
logger.info("Génération du spawn...")
|
||||
|
|
|
@ -35,7 +35,7 @@ class DragonPlayer(uuid: UUID) {
|
|||
.appendNewline()
|
||||
.append(Component.text("Temps:", NamedTextColor.GOLD))
|
||||
.appendSpace()
|
||||
.append(Component.text(formatDuration(RunnerDragon.TIME)))
|
||||
.append(Component.text(formatDuration(RunnerDragon.ELAPSED_TIME)))
|
||||
.appendNewline()
|
||||
.append(Component.text("Vaches tuées:", NamedTextColor.GOLD))
|
||||
.appendSpace()
|
||||
|
|
|
@ -8,6 +8,6 @@ class TimerTask : BukkitRunnable() {
|
|||
RunnerDragon.instance.playerManager.getPlayers().forEach { (_, player) ->
|
||||
player.updateHeaderFooter()
|
||||
}
|
||||
RunnerDragon.TIME++
|
||||
RunnerDragon.ELAPSED_TIME++
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue