1
0
Fork 0

Compare commits

..

2 commits

Author SHA1 Message Date
b660654c63
fix: world type creation 2025-09-06 12:02:45 +02:00
e17bd28fef
fix: double countdown start 2025-09-06 11:58:34 +02:00
4 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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)

View file

@ -70,8 +70,8 @@ class WorldManager(private val instance: RunnerDragon) {
fun createWorld(name: String, environment: World.Environment, structures: Boolean): World { fun createWorld(name: String, environment: World.Environment, structures: Boolean): World {
val creator = WorldCreator(name) val creator = WorldCreator(name)
creator.environment(World.Environment.NORMAL) creator.environment(environment)
creator.generateStructures(true) creator.generateStructures(structures)
creator.type(WorldType.NORMAL) creator.type(WorldType.NORMAL)
return Bukkit.createWorld(creator)!! return Bukkit.createWorld(creator)!!
} }