diff --git a/src/main/java/eu/carrade/amaury/UHCReloaded/listeners/GameListener.java b/src/main/java/eu/carrade/amaury/UHCReloaded/listeners/GameListener.java index 626cae3..db1b382 100644 --- a/src/main/java/eu/carrade/amaury/UHCReloaded/listeners/GameListener.java +++ b/src/main/java/eu/carrade/amaury/UHCReloaded/listeners/GameListener.java @@ -47,6 +47,7 @@ import eu.carrade.amaury.UHCReloaded.misc.RuntimeCommandsExecutor; import eu.carrade.amaury.UHCReloaded.teams.UHTeam; import eu.carrade.amaury.UHCReloaded.utils.UHSound; +import fr.zcraft.zlib.tools.text.Titles; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -701,6 +702,12 @@ public void onGameStarts(UHGameStartsEvent ev) // Broadcast Bukkit.getServer().broadcastMessage(i.t("start.go")); + // Title + if (p.getConfig().getBoolean("start.displayTitle")) + { + Titles.broadcastTitle(5, 40, 8, i.t("start.title.title"), i.t("start.title.subtitle")); + } + // Commands p.getRuntimeCommandsExecutor().registerCommandsInScheduler(RuntimeCommandsExecutor.AFTER_GAME_START); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 89ef11a..48fbbe4 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -204,6 +204,9 @@ start: volume: 1 pitch: 1 + # Display a title to everyone when the game begins + displayTitle: true + death: diff --git a/src/main/resources/i18n/en_US.yml b/src/main/resources/i18n/en_US.yml index 510d971..5e2235b 100644 --- a/src/main/resources/i18n/en_US.yml +++ b/src/main/resources/i18n/en_US.yml @@ -167,6 +167,9 @@ keys: startSlowAllTeamsTPCmd: "{gray}Use {cc}/uh start slow go{gray} to start the game." go: "{green}--- GO ---" + title: + title: "{darkgreen}Let's go!" + subtitle: "{green}Good luck, and have fun" finish: notStarted: "{ce}The game is not started!" diff --git a/src/main/resources/i18n/fr_FR.yml b/src/main/resources/i18n/fr_FR.yml index 84738fc..7400359 100644 --- a/src/main/resources/i18n/fr_FR.yml +++ b/src/main/resources/i18n/fr_FR.yml @@ -158,7 +158,6 @@ keys: teleportationInProgress: "{lightpurple}Téléportation en cours... Merci de patienter." teleportationInProgressInActionBar: "{lightpurple}Téléportation... {gray}({0}/{1})" teleportationFinishedInActionBar: "{lightpurple}Téléportation terminée. {gray}Ça ne devrait pas tarder..." - startSlowBeforeStartSlowGo: "{ce}Veuillez exécuter {cc}/uh start slow{ce} avant." startSlowWaitBeforeGo: "{ce}Veuillez patienter, les équipes sont en train d'être téléportées." @@ -169,6 +168,9 @@ keys: startSlowAllTeamsTPCmd: "{gray}Utilisez {cc}/uh start slow go{gray} pour démarrer le jeu." go: "{green}--- GO ---" + title: + title: "{darkgreen}C'est parti !" + subtitle: "{green}Bonne chance et bon jeu à tous" finish: notStarted: "{ce}Le jeu n'est pas encore démarré !"