fix: double countdown start
This commit is contained in:
parent
3b5d59d7a0
commit
e17bd28fef
3 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@ package xyz.ineanto.dragon
|
||||||
|
|
||||||
enum class GameState {
|
enum class GameState {
|
||||||
WAITING,
|
WAITING,
|
||||||
|
COUNTDOWN,
|
||||||
LAUNCH,
|
LAUNCH,
|
||||||
GRACE_PERIOD,
|
GRACE_PERIOD,
|
||||||
GAME
|
GAME
|
||||||
|
|
|
@ -54,6 +54,7 @@ class ManageSubCommand {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RunnerDragon.STATE = GameState.COUNTDOWN
|
||||||
player.sendMessage(Component.text("Démarrage de la partie.", NamedTextColor.RED))
|
player.sendMessage(Component.text("Démarrage de la partie.", NamedTextColor.RED))
|
||||||
Bukkit.getOnlinePlayers().forEach { it.inventory.clear() }
|
Bukkit.getOnlinePlayers().forEach { it.inventory.clear() }
|
||||||
StartGameTask().runTaskTimer(RunnerDragon.instance, 0L, 20L)
|
StartGameTask().runTaskTimer(RunnerDragon.instance, 0L, 20L)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue