Snoop the backend's player list header/footer so the proxy's values stay in sync#1818
Snoop the backend's player list header/footer so the proxy's values stay in sync#1818WouterGritter wants to merge 2 commits into
Conversation
…values stay in sync with what the player actually sees
|
IMO it is ok as is but I think this could be nice especially with an event to block backend changes. Small nitpicks: |
So I was wrong: currently, the playerlist header & footer do not survive a server switch. Looks like this is by design, as we do re-send the header/footer after server switch (as per the PR description), but before that, we clear the header/footer (see This means that right now (before and after this PR), eventhough Apart from an event (should we add this?), this PR should be good to go. |
Right now this kinda a half-implemented feature. We can send player list header/footer
Components to the player from proxy plugins, and we can also get the ones last sent by the proxy through plugins, but this is misleading. It's not the current header/footer that the client is displaying, as a backend may have overridden these.Would it be worth it to introduce an event for this as well? One that would fire both when the backend sends this packet, and also when a plugin sets these manually with
ConnectedPlayer#sendPlayerListHeaderAndFooter, allowing theComponents to be manipulated?This has an added bonus (or regression?) of keeping a client's player list header/footer when they switch servers now.ConfigSessionHandlerline 247 currently sends these values right after switching to PLAY.