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

How time support BlackList #95

Open
8MiYile opened this issue Aug 5, 2024 · 1 comment
Open

How time support BlackList #95

8MiYile opened this issue Aug 5, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@8MiYile
Copy link

8MiYile commented Aug 5, 2024

because i need protect velocity's command
but i just ban some command

@8MiYile 8MiYile added the enhancement New feature or request label Aug 5, 2024
@YouHaveTrouble
Copy link
Owner

you can use cw dump to print out all available commands to a file.
The plugin was always meant to be a whitelist, and it's not really in the scope to go the opposite way

UltimateBoi added a commit to UltimateBoi/CommandWhitelist that referenced this issue Jan 15, 2025
Fixes YouHaveTrouble#95

Add support for blacklisting commands to protect velocity's command.

* Add methods `addToBlacklist` and `removeFromBlacklist` in `CWCommand.java` to manage blacklisted commands.
* Update `helpComponent` method in `CWCommand.java` to include blacklist commands in the help message.
* Add `blacklist` field in `CWGroup.java` to store blacklisted commands.
* Add methods `addToBlacklist` and `removeFromBlacklist` in `CWGroup.java` to manage the blacklist.
* Update `serialize` method in `CWGroup.java` to include the blacklist.
* Add method `getBlacklistedCommands` in `CommandWhitelistVelocity.java` to retrieve blacklisted commands.
* Update `onUserCommandExecuteEvent` and `onUserTabCompleteEvent` in `CommandWhitelistVelocity.java` to check for and filter out blacklisted commands.
* Add subcommands `blacklist add` and `blacklist remove` in `VelocityMainCommand.java` to manage the blacklist.
* Update help message in `VelocityMainCommand.java` to include the new blacklist commands.

Possible solution to this problem (enhancement). Cant test right now, OP of issue YouHaveTrouble#95 could test?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants