Class SmartCommand

java.lang.Object
de.goldmensch.commanddispatcher.command.SmartCommand
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor

public abstract class SmartCommand extends Object implements org.bukkit.command.TabExecutor
  • Constructor Details

    • SmartCommand

      public SmartCommand()
  • Method Details

    • registerSubCommand

      public void registerSubCommand(@NotNull @NotNull SmartSubCommand command, @NotNull @NotNull String... args)

      Registers a subcommand, the subcommand may occur only once with the same path!

      Example: 'registerSubCommand(new AboutSub(ExecutorLevel.CONSOLE_PLAYER, ""), "about");'

      Parameters:
      command - The subcommand to be executed
      args - the complete path of the command including name
    • isValid

      protected boolean isValid(@NotNull @NotNull String[] args)
    • searchSub

      @NotNull protected @NotNull Optional<SmartCommand.SubCommandEntity> searchSub(@NotNull @NotNull String[] args)
    • getSubCommandMap

      @NotNull protected @NotNull Map<String[],​SmartSubCommand> getSubCommandMap()