Interface RegisterCommandEvent.Result<C>
-
- Enclosing interface:
- RegisterCommandEvent<C>
public static interface RegisterCommandEvent.Result<C>TheRegisterCommandEvent.Resultof a command registration, allowing for the chaining of other command registrations, or the retrival of theCommandMappinggenerated from the registration that returned this result.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandMappingmapping()TheCommandMappinggenerated 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- ThePluginContainercommand- The command to registeralias- The first alias to register for this commandaliases- Any other aliases to register- Returns:
- The
RegisterCommandEvent.Result, which contains theCommandMappingfor this registration, while also allowing for chaining of other command registrations. - Throws:
CommandFailedRegistrationException- if registration failed
-
mapping
CommandMapping mapping()
TheCommandMappinggenerated for the previous registration.- Returns:
- The
CommandMapping
-
-