Class ADPSubCommand

    • Field Detail

      • plugin

        @NotNull
        protected final @NotNull ADPPlugin plugin
      • mainCommand

        @NotNull
        protected final @NotNull ADPMainCommand mainCommand
      • command

        @NotNull
        protected final @NotNull ADPCommand command
      • commandName

        @NotNull
        protected final @NotNull String commandName
      • executableByConsole

        protected final boolean executableByConsole
      • listedInHelp

        protected boolean listedInHelp
      • description

        protected String description
      • syntax

        protected String syntax
    • Constructor Detail

      • ADPSubCommand

        public ADPSubCommand()
    • Method Detail

      • preRequisites

        public abstract boolean preRequisites​(@NotNull
                                              @NotNull CommandData commandData)
        Used to check player before async execution of the command handler.
        Parameters:
        commandData - the command payload
        Returns:
        true if the player can execute the command
      • onCommand

        public abstract void onCommand​(@NotNull
                                       @NotNull CommandData commandData)
        Async command handler
        Parameters:
        commandData - the command payload
      • onTabComplete

        public List<String> onTabComplete​(@NotNull
                                          @NotNull User sender,
                                          @NotNull
                                          @NotNull String[] args)
        Used to tab complete the command
        Parameters:
        sender - the user that send the tab complete
        args - arguments of the tab complete
        Returns:
        a list of strings to tab complete
      • baseSyntax

        @NotNull
        protected @NotNull String baseSyntax()
        Used to make a base of the syntax
        Returns:
        the command syntax