Interface RegisterCommandEvent.Result<C>
- Enclosing interface:
- RegisterCommandEvent<C>
public static interface RegisterCommandEvent.Result<C>
The
RegisterCommandEvent.Result
of a command registration, allowing for the chaining
of other command registrations, or the retrival of the
CommandMapping
generated from the registration that returned this
result.-
Method Summary
Modifier and TypeMethodDescriptionmapping()
TheCommandMapping
generated for the previous registration.register
(org.spongepowered.plugin.PluginContainer container, C command, String alias, String... aliases) Registers a command with the appropriateCommandRegistrar
.
-
Method Details
-
register
RegisterCommandEvent.Result<C> register(org.spongepowered.plugin.PluginContainer container, C command, String alias, String... aliases) throws CommandFailedRegistrationException Registers a command with the appropriateCommandRegistrar
.- Parameters:
container
- ThePluginContainer
command
- The command to registeralias
- The first alias to register for this commandaliases
- Any other aliases to register- Returns:
- The
RegisterCommandEvent.Result
, which contains theCommandMapping
for this registration, while also allowing for chaining of other command registrations. - Throws:
CommandFailedRegistrationException
- if registration failed
-
mapping
CommandMapping mapping()TheCommandMapping
generated for the previous registration.- Returns:
- The
CommandMapping
-