fix(ping): support Purpur NameAndId samples
Release / release (push) Successful in 2m24s
CI / build (push) Successful in 1m42s

This commit is contained in:
dmg
2026-09-05 08:58:46 -04:00
parent a084f86c1d
commit 831f6a2ce4
9 changed files with 145 additions and 25 deletions
@@ -23,6 +23,8 @@ As an **unlocked player**, I want to disconnect while invisibility from a potion
- [x] Concealed players are excluded from any player-name sample shown for the server-list count, while ordinary players remain represented.
- [x] The public count never becomes negative, and the configured maximum-player count remains unchanged.
- [x] Server-list concealment changes only the public ping response and does not alter actual online-player state or gameplay.
- [x] Server-list filtering remains error-free when Purpur represents player samples with native `NameAndId` values rather than Mojang `GameProfile` values.
- [x] A server-ping compatibility failure leaves the original response usable and does not produce repeated unhandled listener exceptions.
- [x] By default, concealed players are excluded from sleep-percentage calculations.
- [x] When the sleep-count policy is `include`, concealed players count normally; ordinary players are never modified by either policy.
- [x] A player's previous sleeping-ignore state is restored when concealment ends, the player disconnects or is reset, the policy changes to `include`, or the plugin disables.
@@ -37,7 +39,7 @@ As an **unlocked player**, I want to disconnect while invisibility from a potion
## Validation
Automated tests verify unlocked and locked disconnect transitions, ordinary-disconnect clearing, one-login consumption, concealed join and quit announcement suppression, preservation of ordinary announcements, private activation messaging, ordinary-login presentation, tab removal for existing and new observers, overhead-name suppression, active concealed-session tracking, public server-list count and sample filtering, nonnegative counts, unchanged maximum capacity, default sleep-count exclusion, immediate policy changes, restoration of prior sleeping-ignore state, and the absence of entity-hiding calls. ProtocolLib is declared as a required dependency, prepared state round trips through YAML, and `./gradlew clean check jar` passes.
Automated tests verify unlocked and locked disconnect transitions, ordinary-disconnect clearing, one-login consumption, concealed join and quit announcement suppression, preservation of ordinary announcements, private activation messaging, ordinary-login presentation, tab removal for existing and new observers, overhead-name suppression, active concealed-session tracking, ProtocolLib-independent native player-sample filtering, guarded public server-list count adjustment, nonnegative counts, unchanged maximum capacity, default sleep-count exclusion, immediate policy changes, restoration of prior sleeping-ignore state, and the absence of entity-hiding calls. ProtocolLib is declared as a required dependency, prepared state round trips through YAML, and `./gradlew clean check jar` passes.
## Related