co.aikar.commands

## Class BukkitCommandManager

- java.lang.Object
- - co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>
  - - co.aikar.commands.BukkitCommandManager

    public class BukkitCommandManager
    extends co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>

### Field Summary

Fields
`protected boolean` `autoDetectFromClient`
`protected BukkitCommandCompletions` `completions`
`protected BukkitCommandContexts` `contexts`
`protected Map<String,org.bukkit.command.Command>` `knownCommands`
`protected BukkitLocales` `locales`
`Integer` `mcMinorVersion`
`Integer` `mcPatchVersion`
`protected org.bukkit.plugin.Plugin` `plugin`
`protected Map<String,BukkitRootCommand>` `registeredCommands`

### Fields inherited from class co.aikar.commands.CommandManager

`conditions, defaultExceptionHandler, defaultFormatter, defaultHelpPerPage, dependencies, formatters, helpFormatter, issuersLocale, localeChangedCallbacks, replacements, rootCommands, supportedLanguages, usePerIssuerLocale`

### Constructor Summary

Constructors
Constructor and Description
`BukkitCommandManager(org.bukkit.plugin.Plugin plugin)`

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`BukkitCommandExecutionContext` `createCommandContext(co.aikar.commands.RegisteredCommand command, co.aikar.commands.CommandParameter parameter, co.aikar.commands.CommandIssuer sender, List<String> args, int i, Map<String,Object> passedArgs)`
`BukkitCommandCompletionContext` `createCompletionContext(co.aikar.commands.RegisteredCommand command, co.aikar.commands.CommandIssuer sender, String input, String config, String[] args)`
`BukkitConditionContext` `createConditionContext(co.aikar.commands.CommandIssuer issuer, String config)`
`co.aikar.commands.RegisteredCommand` `createRegisteredCommand(co.aikar.commands.BaseCommand command, String cmdName, Method method, String prefSubCommand)`
`co.aikar.commands.RootCommand` `createRootCommand(String cmd)`
`co.aikar.commands.CommandCompletions<BukkitCommandCompletionContext>` `getCommandCompletions()`
`co.aikar.commands.CommandContexts<BukkitCommandExecutionContext>` `getCommandContexts()`
`BukkitCommandIssuer` `getCommandIssuer(Object issuer)`
`String` `getCommandPrefix(co.aikar.commands.CommandIssuer issuer)`
`BukkitLocales` `getLocales()`
`org.bukkit.plugin.Plugin` `getPlugin()`
`Collection<co.aikar.commands.RootCommand>` `getRegisteredRootCommands()`
`co.aikar.timings.lib.TimingManager` `getTimings()`
`protected boolean` `handleUncaughtException(co.aikar.commands.BaseCommand scope, co.aikar.commands.RegisteredCommand registeredCommand, co.aikar.commands.CommandIssuer sender, List<String> args, Throwable t)`
`boolean` `hasRegisteredCommands()`
`boolean` `isCommandIssuer(Class<?> type)`
`void` `log(co.aikar.commands.LogLevel level, String message, Throwable throwable)`
`void` `registerCommand(co.aikar.commands.BaseCommand command)`
`void` `registerCommand(co.aikar.commands.BaseCommand command, boolean force)`
`Locale` `setPlayerLocale(org.bukkit.entity.Player player, Locale locale)`
`void` `unregisterCommand(co.aikar.commands.BaseCommand command)`
`void` `unregisterCommand(BukkitRootCommand command)` Deprecated. Use unregisterCommand(BaseCommand) - this will be visibility reduced later.
`void` `unregisterCommands()`
`boolean` `usePerIssuerLocale(boolean usePerIssuerLocale, boolean autoDetectFromClient)`

### Methods inherited from class co.aikar.commands.CommandManager

`addSupportedLanguage, enableUnstableAPI, formatMessage, generateCommandHelp, generateCommandHelp, generateCommandHelp, generateCommandHelp, getCommandConditions, getCommandReplacements, getCurrentCommandIssuer, getCurrentCommandManager, getCurrentCommandOperationContext, getDefaultExceptionHandler, getDefaultFormatter, getDefaultHelpPerPage, getFormat, getHelpFormatter, getIssuerLocale, getRootCommand, getSupportedLanguages, hasPermission, isLoggingUnhandledExceptions, log, notifyLocaleChange, obtainRootCommand, onLocaleChange, registerDependency, registerDependency, sendMessage, sendMessage, setDefaultExceptionHandler, setDefaultExceptionHandler, setDefaultFormatter, setDefaultHelpPerPage, setFormat, setFormat, setFormat, setHelpFormatter, setIssuerLocale, usePerIssuerLocale, usingPerIssuerLocale`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### plugin

    protected final org.bukkit.plugin.Plugin plugin

#### mcMinorVersion

    public final Integer mcMinorVersion

#### mcPatchVersion

    public final Integer mcPatchVersion

#### knownCommands

    protected Map<String,org.bukkit.command.Command> knownCommands

#### registeredCommands

    protected Map<String,BukkitRootCommand> registeredCommands

#### contexts

    protected BukkitCommandContexts contexts

#### completions

    protected BukkitCommandCompletions completions

#### locales

    protected BukkitLocales locales

#### autoDetectFromClient

    protected boolean autoDetectFromClient

### Constructor Detail

#### BukkitCommandManager

    public BukkitCommandManager(org.bukkit.plugin.Plugin plugin)

### Method Detail

#### getPlugin

    public org.bukkit.plugin.Plugin getPlugin()

#### isCommandIssuer

    public boolean isCommandIssuer(Class<?> type)

Specified by:
  `isCommandIssuer` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### getCommandContexts

    public co.aikar.commands.CommandContexts<BukkitCommandExecutionContext> getCommandContexts()

Specified by:
  `getCommandContexts` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### getCommandCompletions

    public co.aikar.commands.CommandCompletions<BukkitCommandCompletionContext> getCommandCompletions()

Specified by:
  `getCommandCompletions` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### getLocales

    public BukkitLocales getLocales()

Specified by:
  `getLocales` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### hasRegisteredCommands

    public boolean hasRegisteredCommands()

Specified by:
  `hasRegisteredCommands` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### registerCommand

    public void registerCommand(co.aikar.commands.BaseCommand command,
                                boolean force)

#### registerCommand

    public void registerCommand(co.aikar.commands.BaseCommand command)

Specified by:
  `registerCommand` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### unregisterCommand

    public void unregisterCommand(co.aikar.commands.BaseCommand command)

#### unregisterCommand

    @Deprecated
    public void unregisterCommand(BukkitRootCommand command)

Deprecated. Use unregisterCommand(BaseCommand) - this will be visibility reduced later.

Parameters:
  `command` -

#### unregisterCommands

    public void unregisterCommands()

#### setPlayerLocale

    public Locale setPlayerLocale(org.bukkit.entity.Player player,
                                  Locale locale)

#### getTimings

    public co.aikar.timings.lib.TimingManager getTimings()

#### createRootCommand

    public co.aikar.commands.RootCommand createRootCommand(String cmd)

Specified by:
  `createRootCommand` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### getRegisteredRootCommands

    public Collection<co.aikar.commands.RootCommand> getRegisteredRootCommands()

Specified by:
  `getRegisteredRootCommands` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### getCommandIssuer

    public BukkitCommandIssuer getCommandIssuer(Object issuer)

Specified by:
  `getCommandIssuer` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### createCommandContext

    public BukkitCommandExecutionContext createCommandContext(co.aikar.commands.RegisteredCommand command,
                                                              co.aikar.commands.CommandParameter parameter,
                                                              co.aikar.commands.CommandIssuer sender,
                                                              List<String> args,
                                                              int i,
                                                              Map<String,Object> passedArgs)

Specified by:
  `createCommandContext` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### createCompletionContext

    public BukkitCommandCompletionContext createCompletionContext(co.aikar.commands.RegisteredCommand command,
                                                                  co.aikar.commands.CommandIssuer sender,
                                                                  String input,
                                                                  String config,
                                                                  String[] args)

Specified by:
  `createCompletionContext` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### createRegisteredCommand

    public co.aikar.commands.RegisteredCommand createRegisteredCommand(co.aikar.commands.BaseCommand command,
                                                                       String cmdName,
                                                                       Method method,
                                                                       String prefSubCommand)

Overrides:
  `createRegisteredCommand` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### createConditionContext

    public BukkitConditionContext createConditionContext(co.aikar.commands.CommandIssuer issuer,
                                                         String config)

Overrides:
  `createConditionContext` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### log

    public void log(co.aikar.commands.LogLevel level,
                    String message,
                    Throwable throwable)

Specified by:
  `log` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### usePerIssuerLocale

    public boolean usePerIssuerLocale(boolean usePerIssuerLocale,
                                      boolean autoDetectFromClient)

#### getCommandPrefix

    public String getCommandPrefix(co.aikar.commands.CommandIssuer issuer)

Overrides:
  `getCommandPrefix` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`

#### handleUncaughtException

    protected boolean handleUncaughtException(co.aikar.commands.BaseCommand scope,
                                              co.aikar.commands.RegisteredCommand registeredCommand,
                                              co.aikar.commands.CommandIssuer sender,
                                              List<String> args,
                                              Throwable t)

Overrides:
  `handleUncaughtException` in class `co.aikar.commands.CommandManager<org.bukkit.command.CommandSender,BukkitCommandIssuer,org.bukkit.ChatColor,BukkitMessageFormatter,BukkitCommandExecutionContext,BukkitConditionContext>`