# BukkitCommandManager (ACF (Bukkit) 0.5.1-SNAPSHOT API)
declaration: package: co.aikar.commands, class: BukkitCommandManager

Package 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
Modifier and Type
Field
Description
`protected boolean`
`autoDetectFromClient`
`protected BukkitCommandCompletions`
`completions`
`protected BukkitCommandContexts`
`contexts`
`protected Map<UUID,String>`
`issuersLocaleString`
`protected Map<String,org.bukkit.command.Command>`
`knownCommands`
`protected BukkitLocales`
`locales`
`final Integer`
`mcMinorVersion`
`final Integer`
`mcPatchVersion`
`protected final 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
Description
`BukkitCommandManager(org.bukkit.plugin.Plugin plugin)`

## Method Summary

Modifier and Type
Method
Description
`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()`
`ACFBukkitScheduler`
`getScheduler()`
`co.aikar.timings.lib.TimingManager`
`getTimings()`
Deprecated.
`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, 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 Details

### 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

### issuersLocaleString

protected Map<UUID,String> issuersLocaleString

### autoDetectFromClient

protected boolean autoDetectFromClient

## Constructor Details

### BukkitCommandManager

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

## Method Details

### 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

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

### getScheduler

public ACFBukkitScheduler getScheduler()

### 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>`