Skip to content
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

Fix: Custom Scoreboard Player Count Including Offline Players #3026

Merged
merged 11 commits into from
Dec 13, 2024

Conversation

Chissl
Copy link
Contributor

@Chissl Chissl commented Dec 6, 2024

What

Fixed custom scoreboard's player count display on private islands/garden including players that were offline or on other islands. Also changed max player count on private islands from guest limit to online island owners + guest limit. Added an "Island" widget type to pull player names on solo islands and when guesting.

Changelog Fixes

  • Fixed Custom Scoreboard's player count to exclude offline players in co-ops and guest islands. - Chissl

Changelog Technical Details

  • Introduced "Island" widget type. - Chissl

@github-actions github-actions bot added Bug Fix Bug fixes Detekt Has detekt problem labels Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

One or more Detekt Failures were detected:

  • HypixelData.kt#L104: Repo pattern playerAmountOnIslandPattern failed regex test: §r§b§lCoop §r§f(8) pattern: ^§.\[[§\w]{6,11}] §r.*.
  • HypixelData.kt#L128: Private property soloProfileAmountPattern is unused.

@github-actions github-actions bot removed the Detekt Has detekt problem label Dec 6, 2024
@hannibal002 hannibal002 added this to the Version 0.28 milestone Dec 6, 2024
@Chissl Chissl requested a review from j10a1n15 December 7, 2024 00:08
src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt Outdated Show resolved Hide resolved
@github-actions github-actions bot added the Detekt Has detekt problem label Dec 8, 2024
Copy link

github-actions bot commented Dec 8, 2024

One or more Detekt Failures were detected:

@github-actions github-actions bot removed the Detekt Has detekt problem label Dec 8, 2024
Copy link
Owner

@hannibal002 hannibal002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant reproduce the bug
image

@j10a1n15
Copy link
Contributor

j10a1n15 commented Dec 8, 2024

I cant reproduce the bug

image
you need to be on your own island while in a coop

@hannibal002
Copy link
Owner

you need to be on your own island while in a coop

ive tried on private island as well

Copy link
Contributor

@j10a1n15 j10a1n15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
works for me

@Chissl
Copy link
Contributor Author

Chissl commented Dec 8, 2024

works for me
It's a bug documented since scoreboard release too https://discord.com/channels/997079228510117908/1222605332648296468/1222605332648296468

Should break when visiting people too since it always adds 1 to amount if it detects a solo island. Maybe regex broke or something?

@hannibal002
Copy link
Owner

now it breaks on private island in production. in dev env was it working fine. hmm

@hannibal002
Copy link
Owner

on other players islands it doesnt break, neither in dev env nor prod
image

@j10a1n15
Copy link
Contributor

j10a1n15 commented Dec 8, 2024

on other players islands it doesnt break, neither in dev env nor prod

the old code just sums up the numbers. so it takes the 4 from "Coop (4)" even though only 1 person is only rn
image
image

it doesnt break when visiting coop profiles because the tablist doesnt use the "Coop (4)" line here

@Chissl
Copy link
Contributor Author

Chissl commented Dec 8, 2024

on other players islands it doesnt break, neither in dev env nor prod

It doesn't detect coops at all when guesting, it assumes every guest island is solo
image

@Chissl
Copy link
Contributor Author

Chissl commented Dec 8, 2024

it doesnt break when visiting coop profiles because the tablist doesnt use the "Coop (4)" line here

Yeah visiting people's islands and solo islands has "Island" header instead of of coop, which triggers this code instead, which will always increment 1 to amount regardless of how many people own the island and if they're on the island
image
based on this regex
image
which is this
image

Not sure why it's coded like there will only be one instance of it in tab list

I replaced this with with a widget that contains every island owner name

@Chissl
Copy link
Contributor Author

Chissl commented Dec 8, 2024

on other players islands it doesnt break, neither in dev env nor prod

It is breaking here, there are 6 people on island but shows 7 in scoreboard

@Chissl Chissl requested a review from hannibal002 December 8, 2024 20:07
@hannibal002 hannibal002 merged commit ad2ef78 into hannibal002:beta Dec 13, 2024
6 checks passed
@github-actions github-actions bot removed the Bug Fix Bug fixes label Dec 13, 2024
@Chissl Chissl deleted the custom-scoreboard-player-fix branch December 13, 2024 17:04
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.

4 participants