Add essentials.chat.spy.exempt.block permission to fully block PMs to exempt players - #6603
Open
xBanD3l wants to merge 1 commit into
Open
Add essentials.chat.spy.exempt.block permission to fully block PMs to exempt players#6603xBanD3l wants to merge 1 commit into
xBanD3l wants to merge 1 commit into
Conversation
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.
Information
This PR closes #6599.
Details
Proposed feature:
Adds a new permission,
essentials.chat.spy.exempt.block, that fully blocks incoming private messages to the holder, rather than only hiding them from/socialspy.Currently,
essentials.chat.spy.exemptonly suppresses the socialspy broadcast copy of a private message sent to the exempt player — the message itself is still delivered to them. As raised in #6599, this doesn't fully protect the exempt player's privacy, since the sender's message content is still delivered and visible to the recipient (and, depending on setup, could still be observed/logged elsewhere).Rather than changing the behavior of the existing
essentials.chat.spy.exemptpermission (which is widely used today purely to hide staff DMs from/socialspy, and changing it would break that behavior for existing servers), this adds a new, dedicated sub-permission that must be granted explicitly:essentials.chat.spy.exempt.block: fully blocks incoming PMs to the holder. The sender sees the same "has messages disabled" feedback used foressentials.msgtoggle, so the block doesn't leak that it's related to socialspy exemption. No socialspy broadcast occurs for blocked messages (there's nothing to observe, since the message is never delivered), and holding this permission also implies exemption from/socialspyeven ifessentials.chat.spy.exemptisn't separately granted.essentials.chat.spy.exemptbehavior is completely unchanged — no existing server's permission setup is affected.Environments tested:
OS: Windows 11
Java version: OpenJDK Temurin 25.0.3+9
Demonstration:
Tested manually using
./gradlew build :runServerwith LuckPerms installed, using three test players (A, B, C):essentials.chat.spy.exempt.blockto player B, andessentials.socialspyto player C (spy)./msg B <message>: A received "PlayerB has messages disabled.", B received nothing, and C (spying) saw nothing.essentials.chat.spy.exemptpermission on its own (without.block): messages still deliver normally to the exempt player, and the socialspy broadcast is still suppressed, exactly as before this change.