Class PluginCommand

    • Method Detail

      • execute

        public boolean execute​(@NotNull
                               CommandSender sender,
                               @NotNull
                               String commandLabel,
                               @NotNull
                               String[] args)
        Executes the command, returning its success
        Specified by:
        execute in class Command
        Parameters:
        sender - Source object which is executing this command
        commandLabel - The alias of the command used
        args - All arguments passed to the command, split via ' '
        Returns:
        true if the command was successful, otherwise false
      • setTabCompleter

        public void setTabCompleter​(@Nullable
                                    TabCompleter completer)
        Sets the TabCompleter to run when tab-completing this command.

        If no TabCompleter is specified, and the command's executor implements TabCompleter, then the executor will be used for tab completion.

        Parameters:
        completer - New tab completer
      • getTabCompleter

        @Nullable
        public TabCompleter getTabCompleter()
        Gets the TabCompleter associated with this command.
        Returns:
        TabCompleter object linked to this command