Interface RegisterCommandEvent.Result<C>
-
- Enclosing interface:
- RegisterCommandEvent<C>
public static interface RegisterCommandEvent.Result<C>
TheRegisterCommandEvent.Result
of a command registration, allowing for the chaining of other command registrations, or the retrival of theCommandMapping
generated from the registration that returned this result.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandMapping
mapping()
TheCommandMapping
generated for the previous registration.RegisterCommandEvent.Result<C>
register(org.spongepowered.plugin.PluginContainer container, C command, String alias, String... aliases)
Registers a command with the appropriateCommandRegistrar
.
-
-
-
Method Detail
-
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
-
-