Package co.aikar.commands
Class VelocityCommandManager
- java.lang.Object
-
- co.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
- co.aikar.commands.VelocityCommandManager
-
public class VelocityCommandManager extends co.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
-
Field Summary
Fields Modifier and Type Field Description protected VelocityCommandCompletionscompletionsprotected VelocityCommandContextscontextsprotected VelocityLocaleslocalesprotected com.velocitypowered.api.plugin.PluginContainerpluginprotected com.velocitypowered.api.proxy.ProxyServerproxyprotected Map<String,VelocityRootCommand>registeredCommands
-
Constructor Summary
Constructors Constructor Description VelocityCommandManager(com.velocitypowered.api.proxy.ProxyServer proxy, Object plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VelocityCommandExecutionContextcreateCommandContext(co.aikar.commands.RegisteredCommand command, co.aikar.commands.CommandParameter parameter, co.aikar.commands.CommandIssuer sender, List<String> args, int i, Map<String,Object> passedArgs)co.aikar.commands.CommandCompletionContextcreateCompletionContext(co.aikar.commands.RegisteredCommand command, co.aikar.commands.CommandIssuer sender, String input, String config, String[] args)VelocityConditionContextcreateConditionContext(co.aikar.commands.CommandIssuer issuer, String config)co.aikar.commands.RegisteredCommandcreateRegisteredCommand(co.aikar.commands.BaseCommand command, String cmdName, Method method, String prefSubCommand)co.aikar.commands.RootCommandcreateRootCommand(String cmd)co.aikar.commands.CommandCompletions<VelocityCommandCompletionContext>getCommandCompletions()co.aikar.commands.CommandContexts<VelocityCommandExecutionContext>getCommandContexts()VelocityCommandIssuergetCommandIssuer(Object issuer)StringgetCommandPrefix(co.aikar.commands.CommandIssuer issuer)VelocityLocalesgetLocales()com.velocitypowered.api.plugin.PluginContainergetPlugin()com.velocitypowered.api.proxy.ProxyServergetProxy()Collection<co.aikar.commands.RootCommand>getRegisteredRootCommands()booleanhasRegisteredCommands()booleanisCommandIssuer(Class<?> aClass)voidlog(co.aikar.commands.LogLevel level, String message, Throwable throwable)voidreadLocale(com.velocitypowered.api.proxy.Player player)voidregisterCommand(co.aikar.commands.BaseCommand command)voidunregisterCommand(co.aikar.commands.BaseCommand command)voidunregisterCommand(VelocityRootCommand command)voidunregisterCommands()-
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, handleUncaughtException, hasPermission, hasPermission, isLoggingUnhandledExceptions, log, notifyLocaleChange, obtainRootCommand, onLocaleChange, registerDependency, registerDependency, sendMessage, sendMessage, setDefaultExceptionHandler, setDefaultExceptionHandler, setDefaultFormatter, setDefaultHelpPerPage, setFormat, setFormat, setFormat, setHelpFormatter, setIssuerLocale, usePerIssuerLocale, usingPerIssuerLocale
-
-
-
-
Field Detail
-
proxy
protected final com.velocitypowered.api.proxy.ProxyServer proxy
-
plugin
protected final com.velocitypowered.api.plugin.PluginContainer plugin
-
registeredCommands
protected Map<String,VelocityRootCommand> registeredCommands
-
contexts
protected VelocityCommandContexts contexts
-
completions
protected VelocityCommandCompletions completions
-
locales
protected VelocityLocales locales
-
-
Constructor Detail
-
VelocityCommandManager
public VelocityCommandManager(com.velocitypowered.api.proxy.ProxyServer proxy, Object plugin)
-
-
Method Detail
-
getProxy
public com.velocitypowered.api.proxy.ProxyServer getProxy()
-
getPlugin
public com.velocitypowered.api.plugin.PluginContainer getPlugin()
-
getCommandContexts
public co.aikar.commands.CommandContexts<VelocityCommandExecutionContext> getCommandContexts()
- Specified by:
getCommandContextsin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
getCommandCompletions
public co.aikar.commands.CommandCompletions<VelocityCommandCompletionContext> getCommandCompletions()
- Specified by:
getCommandCompletionsin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
getLocales
public VelocityLocales getLocales()
- Specified by:
getLocalesin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
readLocale
public void readLocale(com.velocitypowered.api.proxy.Player player)
-
registerCommand
public void registerCommand(co.aikar.commands.BaseCommand command)
- Specified by:
registerCommandin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
unregisterCommand
public void unregisterCommand(co.aikar.commands.BaseCommand command)
-
unregisterCommand
public void unregisterCommand(VelocityRootCommand command)
-
unregisterCommands
public void unregisterCommands()
-
hasRegisteredCommands
public boolean hasRegisteredCommands()
- Specified by:
hasRegisteredCommandsin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
isCommandIssuer
public boolean isCommandIssuer(Class<?> aClass)
- Specified by:
isCommandIssuerin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
getCommandIssuer
public VelocityCommandIssuer getCommandIssuer(Object issuer)
- Specified by:
getCommandIssuerin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
createRootCommand
public co.aikar.commands.RootCommand createRootCommand(String cmd)
- Specified by:
createRootCommandin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
getRegisteredRootCommands
public Collection<co.aikar.commands.RootCommand> getRegisteredRootCommands()
- Specified by:
getRegisteredRootCommandsin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
createCommandContext
public VelocityCommandExecutionContext 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:
createCommandContextin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
createCompletionContext
public co.aikar.commands.CommandCompletionContext createCompletionContext(co.aikar.commands.RegisteredCommand command, co.aikar.commands.CommandIssuer sender, String input, String config, String[] args)
- Specified by:
createCompletionContextin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
createRegisteredCommand
public co.aikar.commands.RegisteredCommand createRegisteredCommand(co.aikar.commands.BaseCommand command, String cmdName, Method method, String prefSubCommand)
- Overrides:
createRegisteredCommandin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
createConditionContext
public VelocityConditionContext createConditionContext(co.aikar.commands.CommandIssuer issuer, String config)
- Overrides:
createConditionContextin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
log
public void log(co.aikar.commands.LogLevel level, String message, Throwable throwable)
- Specified by:
login classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
getCommandPrefix
public String getCommandPrefix(co.aikar.commands.CommandIssuer issuer)
- Overrides:
getCommandPrefixin classco.aikar.commands.CommandManager<com.velocitypowered.api.command.CommandSource,VelocityCommandIssuer,net.kyori.text.format.TextColor,VelocityMessageFormatter,VelocityCommandExecutionContext,VelocityConditionContext>
-
-