Skip to content

Implemented Essentials config-option vanish-hide-messages#6578

Open
BlvckBytes wants to merge 1 commit into
EssentialsX:2.xfrom
BlvckBytes:vanish_hide_messages
Open

Implemented Essentials config-option vanish-hide-messages#6578
BlvckBytes wants to merge 1 commit into
EssentialsX:2.xfrom
BlvckBytes:vanish_hide_messages

Conversation

@BlvckBytes

Copy link
Copy Markdown

Information

This PR closes #6577.

Details

Proposed feature:

If this config-option is enabled, death- and quit-messages are not sent to chat while in vanish-mode. The default value is set to false, as to not alter any existing functionality by remaining opt-in rather than opt-out.

Environments tested:

OS: Fedora Linux 42 (Workstation Edition)

Java version: Java 25

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

It's a bit of a challenge to demonstrate the absence of these messages with mere pictures, so for now, I hope that it's okay if I omit the visual demonstration.

…o that of EssentialsDiscord, affecting quit- and death-messages
@JasonHorkles

Copy link
Copy Markdown
Contributor

Silent quit doesn't really need a config option since the essentials.silentquit permission already exists

@BlvckBytes

Copy link
Copy Markdown
Author

Silent quit doesn't really need a config option since the essentials.silentquit permission already exists

Have you read the actual issue I've referred to?

@JasonHorkles

Copy link
Copy Markdown
Contributor

Essentials provides LuckPerms contexts that can be used to only apply the silent join/quit message permissions while vanished. If the team decides it does make sense to have an option for it instead of relying only on contexts for that use case, then why not include join messages in that bunch as well?

@BlvckBytes

Copy link
Copy Markdown
Author

I did not know that Essentials provides contexts - where is that even documented? All I found was a single update changelog on Spigot that mentions them.

As by the codebase, the following are available: essentials:afk, essentials:muted, essentials:vanished, essentials:jailed, essentials:jail.

With this in mind, my main issue of conditionally disabled quit-messages would probably be solvable, so thank you for letting me know! :)

Join-messages are already implemented properly, see:

if (ess.getSettings().allowSilentJoinQuit() && (user.isAuthorized("essentials.silentjoin") || user.isAuthorized("essentials.silentjoin.vanish"))) {
if (user.isAuthorized("essentials.silentjoin.vanish")) {
user.setVanished(true);
}
effectiveMessage = null;

So, if the user has essentials.silentjoin.vanish, their join-message will not be shown and they will be put into vanish-mode.

One could only hide join-message if the new config-option is enabled, but that would break backwards-compatibility, which will make it even harder for me to get this simple feature-request merged. Essentials is full of inconsistencies and asymmetries, so I am simply trying to touch as little as possible. EssentialsDiscord implements this exact option just that it also does so for join-messages, so I thought that mimicking it would be the simplest option, as users already have an idea of what it does.

@JasonHorkles

Copy link
Copy Markdown
Contributor

is that even documented?
It very well may not be, but I can't remember off the top of my head.

The only caveat with the silentjoin.vanish permission is that it puts you into vanish automatically even if you weren't already, which may not be ideal.

All that said, I do think the death message suppression could certainly be useful (though I wonder if it should be a perm like the others?). I'll forward this on to the team to get their thoughts.

@BlvckBytes

Copy link
Copy Markdown
Author

Thanks a bunch! I'm happy to give it time, as there's no urgency on my part. A permission sounds like a very elegant solution, especially in combination with contexts, :)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Essentials misses vanish-hide-messages as to hide death- and quit-messages when vanished (as implemented in EssentialsDiscord)

2 participants