Skip to content

Commit 06c508f

Browse files
committed
fix: CycleMatchModule should not cycle erroneously when players drop below the join.min-players amount
`join.min-players` defines the minimum players to start a match, this option is default to `1` meaning most servers will run correctly, however, previously if you change it to a value higher than 1 and you have `<=` that amount of players playing/participating, the matches will cycle/end erroneously when players leave/join mid-match Signed-off-by: Jason <[email protected]>
1 parent a8ffa02 commit 06c508f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/tc/oc/pgm/cycle/CycleMatchModule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void startCountdown(@Nullable Duration duration) {
4747
public void onPartyChange(PlayerPartyChangeEvent event) {
4848
if (event.wasParticipating()
4949
&& match.isRunning()
50-
&& match.getParticipants().size() < PGM.get().getConfiguration().getMinimumPlayers()) {
50+
&& match.getParticipants().isEmpty()) {
5151
match.getLogger().info("Cycling due to empty match");
5252
match.finish();
5353
startCountdown(null);

0 commit comments

Comments
 (0)