Add Player Count support with configurable intervals and integration#21
Open
FllipEis wants to merge 2 commits into
Open
Add Player Count support with configurable intervals and integration#21FllipEis wants to merge 2 commits into
FllipEis wants to merge 2 commits into
Conversation
… additional group/server integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this pull request does
This pull request adds configurable Player Count support to Proxy Essentials. Instead of only showing the local proxy's current player count, the plugin can now calculate a summed count from the current SimpleCloud group and optional additional targets.
The new
player-countconfiguration allows server owners to include extra SimpleCloud groups and persistent servers in the displayed online/max player count. That calculated count is then used for server-list ping responses and the default player-count placeholders used by MOTD, tablist, and related text rendering.Why this is needed
In a SimpleCloud setup, the visible Minecraft server list count should often represent more than one local proxy instance. Networks may split players across multiple groups or persistent servers, so using only the proxy's direct player count can make the server appear less populated or inconsistent with the actual network state.
This change makes the displayed player count configurable and closer to the intended network-wide view while still preserving the existing local proxy count as a fallback.
Original changes in this pull request
player-countsection to the default BungeeCord and Velocity configs.PlayerCountConfigto the shared configuration model.PlayerCountHandler, which periodically reads SimpleCloud group/server player counts and stores a snapshot.<online_players>and related values can use the calculated count.Follow-up changes added now
After reviewing the first version, I added a hardening commit to make the feature safer and clearer before merge.
player-count.enabledso the summed player-count feature can be explicitly disabled.update-time: 0to disable automatic syncing instead of being coerced to a 1-tick update loop. This avoids accidental high-frequency Cloud API polling.config.ymlfiles, so current installs receive the newplayer-countsection or missingenabledkey even when they are not using the old split config files.update-time: 0behavior.These follow-up changes keep the feature behavior predictable for existing users and avoid surprising runtime behavior when the update interval is set to zero.