ThePhaseCat / phases-discord-rich-presence

Adding Discord Rich Presence to Minecraft in a simple and light way!
MIT License
5 stars 2 forks source link

[FEATURE] Showing player count in server #3

Closed Programmer-Timmy closed 1 month ago

Programmer-Timmy commented 3 months ago

Describe the bug When playing on a server, the player count displays as 1 of 1, even though there are more players and more player slots available.

Expected behavior The player count should show the correct number of players and available slots.

Screenshots image

ThePhaseCat commented 3 months ago

hi! this is the result of me passing 1 to a setting related to party size and party max size in the presence system i use. there seems to be no way of getting the amount of people in a server client-side (at least, from my digging i wasn't able to find any way of doing it). i've removed this code to set these values, thereby removing this from ever showing up in the presence.

sorry :(

Programmer-Timmy commented 3 months ago

No worries. Maybe I can find something for you

Programmer-Timmy commented 3 months ago

ClientPlayNetHandler#getOnlinePlayers will give you information about online players. This is the same data that is shown in the tab menu.

Found this

ThePhaseCat commented 2 months ago

unfortunately that's for forge, not fabric :(

Programmer-Timmy commented 2 months ago

sadnes

ThePhaseCat commented 1 month ago

reopening this because i figured out a way to get how many players are currently on the server you're on, already coded and will be arriving with version 1.5!

ThePhaseCat commented 1 month ago

(also renamed this because it's now a feature lol)

ThePhaseCat commented 1 month ago

This feature was added with version 1.5, which has been released! As such, this pull request will be closed! Thank you for bringing this bug but now feature to my attention!