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

Unregister an existing command registration #2436

Open
A248 opened this issue Jul 22, 2022 · 0 comments
Open

Unregister an existing command registration #2436

A248 opened this issue Jul 22, 2022 · 0 comments
Labels
status: needs triage This label is automatically applied to new issues and pull requests to indicate they require triage

Comments

@A248
Copy link
Contributor

A248 commented Jul 22, 2022

Major SpongeAPI version

9

Is this likely to be a breaking change?

No

What are you requesting?

The ability to unregister a command at any time after registration. I suppose a method such as CommandRegistrar#unregister(CommandMapping) would be suitable; the exact API is of course open for discussion.

The motivation is to support plugins which dynamically register certain commands, and might wish to unregister some commands if their configuration has changed. The most compelling example is an alias plugin, the sort of plugin whose purpose it is to define command aliases. An alias plugin would need to unregister previously-configured aliases after its configuration is reloaded.

Command registration occurs during the CommandRegisterEvent. Unregistration should ideally be possible at any arbitrary time thereafter.

@A248 A248 added the status: needs triage This label is automatically applied to new issues and pull requests to indicate they require triage label Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This label is automatically applied to new issues and pull requests to indicate they require triage
Projects
None yet
Development

No branches or pull requests

1 participant