@Override
    public List<String> onTabComplete(CommandSender sender, org.bukkit.command.Command cmd, String label, String[] args) {
        for (CommandGroup command : commands) {
            if (command.getName().equalsIgnoreCase(cmd.getName())) {
                if (args.length > 0) {
                    int commandAmount = 1;
                    for (String arg : args) {
                        if (command.hasChildCommand(arg)) {
                            command = command.getChildCommand(arg);
                            commandAmount++;
                        }
                    }
                    String[] newArgs;
                    if (args.length == 1) {
                        newArgs = new String[0];
                    } else {
                        newArgs = new String[args.length - commandAmount];
                        System.arraycopy(args, commandAmount, newArgs, 0, args.length - commandAmount);
                    }
                    return command.getTabCompleteList(newArgs);
                }
                return command.getTabCompleteList(args);
            }
        }
        return new ArrayList<>();
    }