src/main/java/com/otherworld/owrp/AbstractCommand.java
protected void addTabbComplete(int indice, String permission, String[] beforeText, String... arg) {
        if (arg != null && arg.length > 0 && indice >= 0) {
            if (tabComplete.containsKey(indice)) {
                tabComplete.get(indice).addAll(Arrays.stream(arg).collect(
                        ArrayList::new,
                        (tabCommands, s) -> tabCommands.add(new TabCommand(indice, s, permission, beforeText)),
                        ArrayList::addAll));
            }else {
                tabComplete.put(indice, Arrays.stream(arg).collect(
                        ArrayList::new,
                        (tabCommands, s) -> tabCommands.add(new TabCommand(indice, s, permission, beforeText)),
                        ArrayList::addAll)
                );
            }
        }
    }
/**
     * Add multiple arguments to an index with permission and words before
     *
     * @param indice     index where the argument is in the command. /myCmd is at the index -1, so
     *                   /myCmd index0 index1 ...
     * @param permission permission to add (may be null)
     * @param beforeText text preceding the argument (may be null)
     * @param arg        word to add
     */
Add multiple arguments to an index with permission and words before
@param indice     index where the argument is in the command. /myCmd is at the index -1, so
/myCmd index0 index1
@param permission permission to add (may be null)
@param beforeText text preceding the argument (may be null)
@param arg        word to add
Add multiple arguments to an index with permission and words before @param indice index where the argument is in the command . / myCmd is at the index - 1 so / myCmd index0 index1 @param permission permission to add ( may be null ) @param beforeText text preceding the argument ( may be null ) @param arg word to add
protected void addTabbComplete(int indice, String permission, String[] beforeText, String... arg) {
        if (arg != null && arg.length > 0 && indice >= 0) {
            if (tabComplete.containsKey(indice)) {
                tabComplete.get(indice).addAll(Arrays.stream(arg).collect(
                        ArrayList::new,
                        (tabCommands, s) -> tabCommands.add(new TabCommand(indice, s, permission, beforeText)),
                        ArrayList::addAll));
            }else {
                tabComplete.put(indice, Arrays.stream(arg).collect(
                        ArrayList::new,
                        (tabCommands, s) -> tabCommands.add(new TabCommand(indice, s, permission, beforeText)),
                        ArrayList::addAll)
                );
            }
        }
    }
protected void addTabbComplete ( int indice , String permission , String [ ] beforeText , String ... arg ) { if ( arg != null && arg . length > 0 && indice >= 0 ) { if ( tabComplete . containsKey ( indice ) ) { tabComplete . get ( indice ) . addAll ( Arrays . stream ( arg ) . collect ( ArrayList :: new , ( tabCommands , s ) -> tabCommands . add ( new TabCommand ( indice , s , permission , beforeText ) ) , ArrayList :: addAll ) ) ; } else { tabComplete . put ( indice , Arrays . stream ( arg ) . collect ( ArrayList :: new , ( tabCommands , s ) -> tabCommands . add ( new TabCommand ( indice , s , permission , beforeText ) ) , ArrayList :: addAll ) ) ; } } }
Add multiple arguments to an index with permission and words before
 @param indice     index where the argument is in the command.
Add multiple arguments to an index with permission and words before @param indice index where the argument is in the command .