diff --git a/core/src/main/java/tc/oc/pgm/start/StartCountdown.java b/core/src/main/java/tc/oc/pgm/start/StartCountdown.java index af5dfa95f1..96fd6e8a1a 100644 --- a/core/src/main/java/tc/oc/pgm/start/StartCountdown.java +++ b/core/src/main/java/tc/oc/pgm/start/StartCountdown.java @@ -8,6 +8,7 @@ import net.kyori.adventure.bossbar.BossBar; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; +import tc.oc.pgm.api.PGM; import tc.oc.pgm.api.match.Match; import tc.oc.pgm.teams.Team; import tc.oc.pgm.teams.TeamMatchModule; @@ -73,7 +74,9 @@ public void onTick(Duration remaining, Duration total) { for (Team team : this.tmm.getParticipatingTeams()) { if (team.isStacked()) { this.balanceWarningSent = true; - getMatch().sendWarning(translatable("match.balanceTeams", team.getName())); + if (isBalanceBroadcasted()) { + getMatch().sendWarning(translatable("match.balanceTeams", team.getName())); + } } } @@ -99,4 +102,8 @@ public void onEnd(Duration total) { public boolean isForced() { return forced; } + + private boolean isBalanceBroadcasted() { + return PGM.get().getConfiguration().shouldBalanceJoin(); + } }