Skip to content

Allow to hide top-voters which have not played before#1522

Open
BlvckBytes wants to merge 2 commits into
BenCodez:masterfrom
BlvckBytes:hide_top_voter_if_not_played_before
Open

Allow to hide top-voters which have not played before#1522
BlvckBytes wants to merge 2 commits into
BenCodez:masterfrom
BlvckBytes:hide_top_voter_if_not_played_before

Conversation

@BlvckBytes

Copy link
Copy Markdown
Contributor

Hey!

We've recently set up a hologram displaying the names of the top 10 voters per month and ran into the issue that even mistyped names show up on there, which is rather undesirable. This probably doesn't happen on large and active servers, as typo vote-counts are tiny in comparison and fall to the very bottom, but with smaller communities, these votes will show up sooner or later.

Since I'm not familiar with the code-base much, I chose a simple solution, namely to hide entries right before sorting the top-list if the flag is enabled and they have not joined the server before. To keep behaviour unchanged relative to prior builds, the flag is default-false.

Looking forward to feedback of any kind if applicable and would be happy if we can get a feature like this in.

@BenCodez

Copy link
Copy Markdown
Owner

The only issue with this is on proxy setups where the offline player check may not be accurate on each backend server. You could disable allowunjoined to prevent invalid names from coming in.

Could also add a required amount of votes to be on top voter as another solution. But this could work on single server setups, but may get confusing on proxy setups.

@BlvckBytes

BlvckBytes commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Hey, and sorry for the late response!

Thank you for telling me about AllowUnjoined, which seems to have a default-value of false - somebody must've enabled it in the past, so that's on us.

The question now becomes how a player having joined is determined; if only via the player-cache instead of Player#hasPlayedBefore, the issue won't be solved that way.

Plus, I somehow need to delete all of those unwanted entries from the database, without doing a full wipe, as to not loose scores of real players. Well, I'll try my best once I get to it and close the PR if it is solvable that way.

@BenCodez

BenCodez commented Jun 22, 2026

Copy link
Copy Markdown
Owner

You could try the purge options, although it would take a while for the non real players be end up being purged (90 days default)
https://github.com/BenCodez/VotingPlugin/blob/master/VotingPlugin/src/main/resources/Config.yml#L639

You can also limit the amount of voters on the vote top (default is 1000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants