Class SpigotCommandManager
java.lang.Object
net.apartium.cocoabeans.commands.CommandManager
net.apartium.cocoabeans.commands.spigot.SpigotCommandManager
public class SpigotCommandManager
extends net.apartium.cocoabeans.commands.CommandManager
A command manager implementation for Spigot and Spigot-based platforms.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Set<net.apartium.cocoabeans.commands.parsers.ArgumentParser<?>>Fields inherited from class net.apartium.cocoabeans.commands.CommandManager
commandMap, COMMON_PARSERS, DEFAULT_KEYWORD_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionSpigotCommandManager(org.bukkit.plugin.java.JavaPlugin plugin) Create a new command manager instance for specified pluginSpigotCommandManager(org.bukkit.plugin.java.JavaPlugin plugin, Logger logger, net.apartium.cocoabeans.commands.ArgumentMapper argumentMapper, net.apartium.cocoabeans.commands.lexer.CommandLexer commandLexer) Create a new command manager instance for specified pluginSpigotCommandManager(org.bukkit.plugin.java.JavaPlugin plugin, net.apartium.cocoabeans.commands.ArgumentMapper argumentMapper) Create a new command manager instance for specified plugin -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCommand(net.apartium.cocoabeans.commands.CommandNode commandNode, net.apartium.cocoabeans.commands.Command command) voidaddVirtualCommand(net.apartium.cocoabeans.commands.virtual.VirtualCommandDefinition definition, Function<net.apartium.cocoabeans.commands.CommandContext, Boolean> callback) booleanMethods inherited from class net.apartium.cocoabeans.commands.CommandManager
addCommand, addMetadataHandler, addVirtualCommand, getArgumentMapper, getCommandInfo, getCommandLexer, getKeywordPriority, getLogger, handleTabComplete, mappingCommandInfo, registerArgumentTypeHandler, registerArgumentTypeHandler, registerRequirementFactory, setKeywordPriority
-
Field Details
-
SPIGOT_PARSERS
-
-
Constructor Details
-
SpigotCommandManager
public SpigotCommandManager(org.bukkit.plugin.java.JavaPlugin plugin) Create a new command manager instance for specified plugin- Parameters:
plugin- plugin to own this command manager
-
SpigotCommandManager
public SpigotCommandManager(org.bukkit.plugin.java.JavaPlugin plugin, net.apartium.cocoabeans.commands.ArgumentMapper argumentMapper) Create a new command manager instance for specified plugin- Parameters:
plugin- plugin to own this command managerargumentMapper- argument mapper instance
-
SpigotCommandManager
@AvailableSince("0.0.41") public SpigotCommandManager(org.bukkit.plugin.java.JavaPlugin plugin, Logger logger, net.apartium.cocoabeans.commands.ArgumentMapper argumentMapper, net.apartium.cocoabeans.commands.lexer.CommandLexer commandLexer) Create a new command manager instance for specified plugin- Parameters:
plugin- plugin to own this command managerargumentMapper- argument mapper instancecommandLexer- command lexer instancelogger- logger
-
-
Method Details
-
addCommand
protected void addCommand(net.apartium.cocoabeans.commands.CommandNode commandNode, net.apartium.cocoabeans.commands.Command command) - Specified by:
addCommandin classnet.apartium.cocoabeans.commands.CommandManager
-
addVirtualCommand
public void addVirtualCommand(net.apartium.cocoabeans.commands.virtual.VirtualCommandDefinition definition, Function<net.apartium.cocoabeans.commands.CommandContext, Boolean> callback) - Overrides:
addVirtualCommandin classnet.apartium.cocoabeans.commands.CommandManager
-
handle
public boolean handle(net.apartium.cocoabeans.commands.Sender sender, String commandName, String[] args) throws Throwable - Overrides:
handlein classnet.apartium.cocoabeans.commands.CommandManager- Throws:
Throwable
-