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 java.util.Set<java.lang.String>
allAliases()
Gets an immutable list of all aliases.java.util.Optional<org.spongepowered.plugin.PluginContainer>
plugin()
Gets the plugin that owns the command, if known.java.lang.String
primaryAlias()
Gets the primary alias that will be passed to the registeredCommandRegistrar
.CommandRegistrar<?>
registrar()
Gets theCommandRegistrar
that registered this command.
-
-
-
Method Detail
-
primaryAlias
java.lang.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
java.util.Set<java.lang.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
java.util.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
-
-