src/main/java/com/otherworld/owrp/AbstractCommand.java
@Override
    public List<String> tabComplete(CommandSender sender, String alias, String[] args) {

        int indice = args.length - 1;

        if ((getPermission() != null && !sender.hasPermission(getPermission())) || tabComplete.size() == 0 || !tabComplete.containsKey(indice))
            return super.tabComplete(sender, alias, args);

        List<String> list = tabComplete.get(indice).stream()
                .filter(tabCommand -> tabCommand.getTextAvant() == null || tabCommand.getTextAvant().contains(args[indice - 1]))
                .filter(tabCommand -> tabCommand.getPermission() == null || sender.hasPermission(tabCommand.getPermission()))
                .filter(tabCommand -> tabCommand.getText().startsWith(args[indice]))
                .map(TabCommand::getText)
                .sorted(String.CASE_INSENSITIVE_ORDER)
                .collect(Collectors.toList());

        return list.size() < 1 ? super.tabComplete(sender, alias, args) : list;

    }
/**
     * @param sender sender
     * @param alias  alias used
     * @param args   argument of the command
     *
     * @return a list of possible values
     */
@param sender sender
@param alias  alias used
@param args   argument of the command

@return a list of possible values
@param sender sender @param alias alias used @param args argument of the command @return a list of possible values
@Override
    public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
        int indice = args.length - 1;
        if ((getPermission() != null && !sender.hasPermission(getPermission())) || tabComplete.size() == 0 || !tabComplete.containsKey(indice))
            return super.tabComplete(sender, alias, args);
        List<String> list = tabComplete.get(indice).stream()
                .filter(tabCommand -> tabCommand.getTextAvant() == null || tabCommand.getTextAvant().contains(args[indice - 1]))
                .filter(tabCommand -> tabCommand.getPermission() == null || sender.hasPermission(tabCommand.getPermission()))
                .filter(tabCommand -> tabCommand.getText().startsWith(args[indice]))
                .map(TabCommand::getText)
                .sorted(String.CASE_INSENSITIVE_ORDER)
                .collect(Collectors.toList());
        return list.size() < 1 ? super.tabComplete(sender, alias, args) : list;
    }
@ Override public List < String > tabComplete ( CommandSender sender , String alias , String [ ] args ) { int indice = args . length - 1 ; if ( ( getPermission ( ) != null && ! sender . hasPermission ( getPermission ( ) ) ) || tabComplete . size ( ) == 0 || ! tabComplete . containsKey ( indice ) ) return super . tabComplete ( sender , alias , args ) ; List < String > list = tabComplete . get ( indice ) . stream ( ) . filter ( tabCommand -> tabCommand . getTextAvant ( ) == null || tabCommand . getTextAvant ( ) . contains ( args [ indice - 1 ] ) ) . filter ( tabCommand -> tabCommand . getPermission ( ) == null || sender . hasPermission ( tabCommand . getPermission ( ) ) ) . filter ( tabCommand -> tabCommand . getText ( ) . startsWith ( args [ indice ] ) ) . map ( TabCommand :: getText ) . sorted ( String . CASE_INSENSITIVE_ORDER ) . collect ( Collectors . toList ( ) ) ; return list . size ( ) < 1 ? super . tabComplete ( sender , alias , args ) : list ; }
@param sender sender
 @param alias  alias used
 @param args   argument of the command
@param sender sender @param alias alias used @param args argument of the command