Interface CommandMapping
-
public interface CommandMapping
Provides information about a mapping between a command and its aliases.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>
allAliases()
Gets an immutable list of all aliases.Optional<org.spongepowered.plugin.PluginContainer>
plugin()
Gets the plugin that owns the command, if known.String
primaryAlias()
Gets the primary alias that will be passed to the registeredCommandRegistrar
.CommandRegistrar<?>
registrar()
Gets theCommandRegistrar
that registered this command.
-
-
-
Method Detail
-
primaryAlias
String primaryAlias()
Gets the primary alias that will be passed to the registeredCommandRegistrar
. Note that this alias may not correspond to an alias inallAliases()
, it is used as an identifier to the underlyingCommandRegistrar
.- Returns:
- The primary alias
-
allAliases
Set<String> allAliases()
Gets an immutable list of all aliases.The returned list must contain at least one entry, of which one must be the one returned by
primaryAlias()
.There may be several versions of the same alias with different casing, although generally implementations should ignore the casing of aliases.
- Returns:
- A set of aliases
-
plugin
Optional<org.spongepowered.plugin.PluginContainer> plugin()
Gets the plugin that owns the command, if known.- Returns:
- The plugin.
-
registrar
CommandRegistrar<?> registrar()
Gets theCommandRegistrar
that registered this command.- Returns:
- The
CommandRegistrar
-
-