Skip to content

Fix /msg command on vanished players#82

Open
crazycat256 wants to merge 2 commits into
LeonMangler:masterfrom
crazycat256:msgcommand
Open

Fix /msg command on vanished players#82
crazycat256 wants to merge 2 commits into
LeonMangler:masterfrom
crazycat256:msgcommand

Conversation

@crazycat256

Copy link
Copy Markdown
Contributor

Currently minecraft message commands (/minecraft:msg /minecraft:tell /minecraft:w) work on vanished players.
This PR fixes this problem by adding a MessageOptions.DisableMsgCommand option that returns an error message when someone tries to send a message to a vanished player. The error message can be customized with the setting FakeNotFound.

@rautamiekka

Copy link
Copy Markdown

Why allow customizing instead of using the vanilla ? A diff msg would tell the person the target is vanished.

@crazycat256

crazycat256 commented Aug 1, 2023

Copy link
Copy Markdown
Contributor Author

Why allow customizing instead of using the vanilla ? A diff msg would tell the person the target is vanished.

If for some reason (a plugin, a version change) the default message is different, this allows you to change it (but effectively, this parameter will probably only be used very rarely).

@rautamiekka

Copy link
Copy Markdown

There has to be a way to ref it from the game itself.

@crazycat256

Copy link
Copy Markdown
Contributor Author

I dont know

@LeonMangler

Copy link
Copy Markdown
Owner

Thank your for the PR, I appreciate the work! I don't have much time currently so it will take a while to go through all the PR's one-by-one, but I will get back to this eventually.

@LeonMangler

Copy link
Copy Markdown
Owner

This is certainly possible without accessing the command map directly. It would also need to be more configurable, e.g., by adding a list of covered commands to the config file. I have this feature in PremiumVanish and I feel like I would like to keep it as a premium-only feature, so I do not really want to copy over the working code from the premium version currently.

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.

3 participants