Skip to content

Commit

Permalink
Create a language option for changing the Finale Countdown message (#100
Browse files Browse the repository at this point in the history
)

* Create FinaleStart.java

* Update VaroGame.java

* Update ConfigMessages.java

* Update ConfigMessages.java

* Delete src/main/java/de/cuuky/varo/game/finale directory

* Update VaroGame.java

* Update VaroGame.java

* Update LanguageEN.java
  • Loading branch information
Kalibrier authored Dec 29, 2024
1 parent 242886f commit 0663412
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public enum ConfigMessages implements DefaultLanguage {
DEATH_KILL_LIFE_ADD("death.killLifeAdd", "Dein Team hat aufgrund eines Kills ein Teamleben erhalten!"),
DEATH_KILL_TIME_ADD("death.killTimeAdd", "Aufgrund deines Kills hast du zusätzlich %colorcode%%timeAdded% &7Sekunden Zeit erhalten!"),

GAME_FINALE_COUNTDOWN("game.finale.finaleCountdown", "&7Das Finale startet in %colorcode%%countdown% &7Sekunde(n)!"),
GAME_START_COUNTDOWN("game.start.startCountdown", "%projectname% &7startet in %colorcode%%countdown% &7Sekunde(n)!"),
GAME_VARO_START("game.start.varoStart", "%projectname% &7wurde gestartet! &5Viel Erfolg!"),
GAME_VARO_START_TITLE("game.start.startTitle", "%colorcode%%countdown%"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public enum LanguageEN implements LoadableMessage {
DEATH_KILL_LIFE_ADD("death.killLifeAdd", "&7Your team got a team life because of a kill!"),
DEATH_KILL_TIME_ADD("death.killTimeAdd", "You've recieved %colorcode%%timeAdded% &7seconds of additional time!"),

GAME_FINALE_COUNTDOWN("game.finale.finaleCountdown", "&7The finale starts in %colorcode%%countdown% &7second(s)!"),
GAME_START_COUNTDOWN("game.start.startCountdown", "%projectname% &7starts in %colorcode%%countdown% &7second(s)!"),
GAME_VARO_START("game.start.varoStart", "%projectname% &7has started! &5Good luck!"),
GAME_VARO_START_TITLE("game.start.startTitle", "%colorcode%%countdown%"),
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/de/cuuky/varo/game/VaroGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public void run() {
}

if (VaroGame.this.finaleCountdown != 0) {
Bukkit.broadcastMessage(Main.getPrefix() + "Das Finale startet in " + VaroGame.this.finaleCountdown + " Sekunden!");
Main.getLanguageManager().broadcastMessage(ConfigMessages.GAME_FINALE_COUNTDOWN).replace("%countdown%", finaleCountdown == 1 ? "einer" : String.valueOf(finaleCountdown));
} else {
VaroGame.this.startFinale();
VaroGame.this.finaleStartScheduler.cancel();
Expand Down Expand Up @@ -526,4 +526,4 @@ public void onDeserializeEnd() {
@Override
public void onSerializeStart() {
}
}
}

0 comments on commit 0663412

Please sign in to comment.