Skip to content

Unregister an existing command registration #2436

@A248

Description

@A248

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageThis label is automatically applied to new issues and pull requests to indicate they require triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions