-
Notifications
You must be signed in to change notification settings - Fork 91
fix: CycleMatchModule should not cycle erroneously when players drop below the join.min-players
amount
#1495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
I believe this works as intended If you wish certain maps to enforce a min player count before starting (eg: tournament-edition versions which require N players to start), you can use the If you wish to change this behavior i think its most appropriate for it to be a separate option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the comment, consider simply making this an extra config setting
&& match.getParticipants().size() < PGM.get().getConfiguration().getMinimumPlayers()) { | ||
&& match.getParticipants().isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would end matches even if min-players
is set to 0, which is often done in debug/test server scenarios so that your matches don't end on you if you rejoin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this scenario makes sense- perhaps a separate configuration option is necessary to more clearly enforce a minimum participant count for continuing a match.
I understand the idea that this configuration might not make sense for enforcing minimum players as each map is different, however, this doesn't make sense from the configuration documentation comments, as the the PGM/core/src/main/resources/config.yml Lines 66 to 68 in 84bce74
Furthermore, using this value as double duty for default minimum player count and as a minimum-continuing-match-player-size creates unnecessary ambiguity.
I disagree, I believe a minimum player count limit for a match to continue should be described in a separate configuration not in the
I think a best case course of action would be to introduce new configuration to more clearly define an option for enforcing a minimum playing player count. |
Yeah the problem may be the config's naming, in modern pgm (1.9+) the config wasn't even in the and had a separate config for cycling when match is empty: In fact, digging into the history it seems that this 1.8-pgm version "simplified" the settings, renaming minimum-players to join.min-players, and removed the match-empty in favor of join.min-players = 0: 12e9e60#diff-c44e8a03c6e51fede2607ed31511ee21a7022f2e615b7ee442acf97a3e0dd29fL48 So yeah, tldr: this was an intentional change to simplify the settings by merging the cycle.empty.enabled: true/false config into the minimum-players encoded as a 0 or a 1, with little regard to what it means for values >1. Feel free to revert these so that we have the cycle enabled as a separate config |
…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]>
e8f21fe
to
29aac7d
Compare
I made it a separate config value and just put it in |
This fixes an issue that most servers will not encounter, unless they changed the
join.min-players
setting.join.min-players
defines the minimum players to start a match, this option is default to1
meaning most servers will run correctly if their configurations are not modified, 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 due to an incorrect comparison that triggers a cycle if empty.