Package com.burchard36.api.command
Class CommandInjector
java.lang.Object
com.burchard36.api.command.exceptions.CommandExceptionFactory
com.burchard36.api.command.CommandInjector
public class CommandInjector
extends com.burchard36.api.command.exceptions.CommandExceptionFactory
Injects ApiCommands into Bukkit's command map
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Injects all commands into the BukkitCommand map Also search's for classes extendingApiCommand
and auto-registers them if they haveCommandName
orRegisterCommand
Annotation(s)protected static void
register(org.bukkit.command.Command command)
Injects ApiCommand into Bukkits CommandMapstatic void
registerCommand(ApiCommand command)
Registers a single commandstatic void
registerCommands(List<ApiCommand> commands)
Registers a whole list of commands at onceMethods inherited from class com.burchard36.api.command.exceptions.CommandExceptionFactory
newClassNotTypeOfApiCommand, newCommandInvocationException, newConstructorNotFoundException, newInvalidCommandAnnotationException
-
Constructor Details
-
CommandInjector
public CommandInjector()
-
-
Method Details
-
injectCommands
public static void injectCommands()Injects all commands into the BukkitCommand map Also search's for classes extendingApiCommand
and auto-registers them if they haveCommandName
orRegisterCommand
Annotation(s) -
registerCommand
Registers a single command- Parameters:
command
- Command extending ApiCommand
-
registerCommands
Registers a whole list of commands at once- Parameters:
commands
- List of classes extending ApiCommand
-
register
protected static void register(org.bukkit.command.Command command)Injects ApiCommand into Bukkits CommandMap- Parameters:
command
- Class extending BukkitCommand to inject into CommandMap
-