Class CommandAutoRegistration
java.lang.Object
net.apartium.cocoabeans.spigot.lazies.CommandAutoRegistration
Command auto registration for spigot.
- See Also:
-
CommandExecutor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceAnnotation to indicate a command class -
Constructor Summary
ConstructorsConstructorDescriptionCommandAutoRegistration(org.bukkit.plugin.java.JavaPlugin plugin) Creates a new instance of command auto registration -
Method Summary
Modifier and TypeMethodDescriptionenableDevCommands(boolean value) Indicates whether to enable dev commands or not.Admits you are a lazy ass developer and lets you register command without putting them in your plugin.yml file.voidAuto discovers command in given package name and its subpackagesvoidAuto discovers command in given package namesetCommandManager(net.apartium.cocoabeans.commands.CommandManager commandManager)
-
Constructor Details
-
CommandAutoRegistration
public CommandAutoRegistration(org.bukkit.plugin.java.JavaPlugin plugin) Creates a new instance of command auto registration- Parameters:
plugin- plugin instance to be associated with new commands
-
-
Method Details
-
enableDevCommands
Indicates whether to enable dev commands or not. default value is false.- Parameters:
value- should commands for dev servers should be loaded:- Returns:
- current instance
- See Also:
-
setCommandManager
public CommandAutoRegistration setCommandManager(net.apartium.cocoabeans.commands.CommandManager commandManager) -
iAmALazyAssDeveloper
Admits you are a lazy ass developer and lets you register command without putting them in your plugin.yml file. By default, this is disabled since everyone should be given a chance.- Returns:
- current instance
-
register
Auto discovers command in given package name and its subpackages- Parameters:
packageName- package name
-
register
Auto discovers command in given package name- Parameters:
packageName- package namedeep- whether sub packages of given package should also be queried
-