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

    Fields
    Modifier and Type
    Field
    Description
    static 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

    Constructors
    Constructor
    Description
    SpigotCommandManager(org.bukkit.plugin.java.JavaPlugin plugin)
    Create a new command manager instance for specified plugin
    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
    SpigotCommandManager(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 Type
    Method
    Description
    protected void
    addCommand(net.apartium.cocoabeans.commands.CommandNode commandNode, net.apartium.cocoabeans.commands.Command command)
     
    void
    addVirtualCommand(net.apartium.cocoabeans.commands.virtual.VirtualCommandDefinition definition, Function<net.apartium.cocoabeans.commands.CommandContext,Boolean> callback)
     
    boolean
    handle(net.apartium.cocoabeans.commands.Sender sender, String commandName, String[] args)
     

    Methods inherited from class net.apartium.cocoabeans.commands.CommandManager

    addCommand, addMetadataHandler, addVirtualCommand, getArgumentMapper, getCommandInfo, getCommandLexer, getKeywordPriority, getLogger, handleTabComplete, mappingCommandInfo, registerArgumentTypeHandler, registerArgumentTypeHandler, registerRequirementFactory, setKeywordPriority

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SPIGOT_PARSERS

      public static final Set<net.apartium.cocoabeans.commands.parsers.ArgumentParser<?>> 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 manager
      argumentMapper - 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 manager
      argumentMapper - argument mapper instance
      commandLexer - command lexer instance
      logger - logger
  • Method Details

    • addCommand

      protected void addCommand(net.apartium.cocoabeans.commands.CommandNode commandNode, net.apartium.cocoabeans.commands.Command command)
      Specified by:
      addCommand in class net.apartium.cocoabeans.commands.CommandManager
    • addVirtualCommand

      public void addVirtualCommand(net.apartium.cocoabeans.commands.virtual.VirtualCommandDefinition definition, Function<net.apartium.cocoabeans.commands.CommandContext,Boolean> callback)
      Overrides:
      addVirtualCommand in class net.apartium.cocoabeans.commands.CommandManager
    • handle

      public boolean handle(net.apartium.cocoabeans.commands.Sender sender, String commandName, String[] args) throws Throwable
      Overrides:
      handle in class net.apartium.cocoabeans.commands.CommandManager
      Throws:
      Throwable