Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help Wanted] Add Brigadier command suggestion filtration #22

Open
lokka30 opened this issue Feb 8, 2025 · 0 comments
Open

[Help Wanted] Add Brigadier command suggestion filtration #22

lokka30 opened this issue Feb 8, 2025 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@lokka30
Copy link
Member

lokka30 commented Feb 8, 2025

Help Wanted!

If you want to try have a stab at implementing this, please leave a comment below, and/or feel free to chat to me on the Discord in #other-lokka30-plugins.

What & Why

At the moment, any Vanilla or Brigadier-registered commands, e.g. /gamemode (vanilla registered, so it uses Brigadier) and /blackwidow (we use Brigadier) won't have their argument suggestions filtered.

For example, if you try to make a rule that blocks the suggestion of /gamemode creative, it is not possible. However, blocking its execution works as expected.

This is because PlayerCommandSendEvent only sends the base commands that the server wants to suggest the player. We are meant to use TabCompleteEvent to listen for arguments, however, this event does not fire for Brigadier (and thus also Vanilla)-registered commands (unless you are in console?????? which there, it works fine?).


Implementation Wanted

I'm unsure how to approach this at the moment, and will edit this with any updates. Regardless, I want BlackWidow to be able to block command argument suggestions for Brigadier commands. So, if someone wants to hide /gamemode creative from the suggestions list, or /bw version, they can do so.

@lokka30 lokka30 self-assigned this Feb 8, 2025
@lokka30 lokka30 added the help wanted Extra attention is needed label Feb 8, 2025
@lokka30 lokka30 changed the title Command blocking: add Brigadier command suggestion filtration [Help Wanted] Add Brigadier command suggestion filtration Feb 8, 2025
@lokka30 lokka30 removed their assignment Feb 8, 2025
@lokka30 lokka30 moved this to Ready in BlackWidow Project Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Status: Ready
Development

No branches or pull requests

1 participant