Sync vanish state across the network for whispers - #818
Open
ItzStanleex wants to merge 1 commit into
Open
Conversation
Vanish state was only ever read live from the local platform (Bukkit metadata on Paper), so it was correct only for players on the same server as the viewer. For players on another networked server the resolved CarbonPlayer reported vanished() == false, so vanished players still appeared in /msg (and aliases) tab completion and could be messaged cross-server, ignoring carbon.whisper.vanished. Vanish state is now carried in the player-presence packets and stored in NetworkUsers, so awareness checks honor it network-wide: - LocalPlayerChangePacket / LocalPlayersPacket now carry a vanished flag (new PlayerInfo record as the presence value type). - NetworkUsers stores per-player vanish state and exposes awareOf(viewer, other) / vanished(other), which fall back to the synced state for remote players. Whisper suggestions and the whisper send guard use it. - Join/quit and the init handshake seed the state; VanishSync polls the abstract CarbonPlayer#vanished() and broadcasts changes, so runtime toggles propagate for any supported vanish plugin (PremiumVanish, SuperVanish, VanishNoPacket, ...) on any platform, with no compile- or runtime dependency on a specific plugin.
Zoriot
suggested changes
Jul 24, 2026
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
ItzStanleex
force-pushed
the
fix/cross-server-vanish-whisper
branch
2 times, most recently
from
August 9, 2026 20:21
d662928 to
dfd7d64
Compare
Zoriot
approved these changes
Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vanish state was only ever read live from the local platform (Bukkit metadata on Paper), so it was correct only for players on the same server as the viewer. For players on another networked server the resolved CarbonPlayer reported vanished() == false, so vanished players still appeared in /msg (and aliases) tab completion and could be messaged cross-server, ignoring carbon.whisper.vanished.
Vanish state is now carried in the player-presence packets and stored in NetworkUsers, so awareness checks honor it network-wide: