Skip to content

Commit

Permalink
Added a title when an episode ends. (#110, closes #27)
Browse files Browse the repository at this point in the history
* NEW: when an episode ends, a title is displayed containing the number of the new episode.
  • Loading branch information
AmauryCarrade committed Jan 12, 2016
1 parent f4ca1d1 commit e9bcede
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,13 @@ public void onEpisodeChange(UHEpisodeChangedEvent ev)
p.getServer().broadcastMessage(message);


// Broadcasts title
if (p.getConfig().getBoolean("episodes.title"))
{
Titles.broadcastTitle(5, 32, 8, i.t("episodes.title.title", ev.getNewEpisode(), ev.getNewEpisode() - 1), i.t("episodes.title.subtitle", ev.getNewEpisode(), ev.getNewEpisode() - 1));
}


// Updates the list headers & footers.
p.getPlayerListHeaderFooterManager().updateHeadersFooters();
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ episodes:
# Don't remove the "quotes" (because of the commas)!
length: "20:00"

# A title is displayed when the episode changes.
title: true



map:
Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/i18n/en_US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ keys:
withTeams: "{darkgreen}{obfuscated}--{green} Congratulations to {0} (team {1}{green}) for their victory! {darkgreen}{obfuscated}--"
withoutTeams: "{darkgreen}{obfuscated}--{green} Congratulations to {0} for his victory! {darkgreen}{obfuscated}--"

# In *all* these strings (subtitles included), {0} contains the winner name (team display name of player display name).
titles:
withTeams:
title: "{darkgreen}{0}"
Expand All @@ -196,7 +197,10 @@ keys:
episodes:
end: "{aqua}-------- End of episode {0} --------"
endForced: "{aqua}-------- End of episode {0} [forced by {1}] --------"

title:
title: "{darkaqua}Episode {aqua}{0}" # {0} contains the new episode number, {1} the previous one (just ended).
subtitle: "" # Same

scoreboard:
episode: "{gray}Episode {white}{0}"
players: "{white}{0}{gray} players"
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/i18n/fr_FR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ keys:
episodes:
end: "{aqua}-------- Fin de l'épisode {0} --------"
endForced: "{aqua}-------- Fin de l'épisode {0} [forcé par {1}] --------"
title:
title: "{darkaqua}Épisode {aqua}{0}"
subtitle: ""

scoreboard:
episode: "{gray}Épisode {white}{0}"
Expand Down

0 comments on commit e9bcede

Please sign in to comment.