@Override
    public boolean hasPermission(@NonNull Permission permission) {
        if (permission == null) {
            throw new NullPointerException("permission");
        }

        QueryOptions queryOptions = this.queryOptionsSupplier.getQueryOptions();
        TristateResult result = this.user.getCachedData().getPermissionData(queryOptions).checkPermission(permission.getName(), CheckOrigin.PLATFORM_API_HAS_PERMISSION);

        // override default op handling using the Permission class we have
        if (result.processorClass() == OpProcessor.class && this.plugin.getConfiguration().get(ConfigKeys.APPLY_BUKKIT_DEFAULT_PERMISSIONS)) {
            // 'op == true' is implied by the presence of the OpProcessor class
            return permission.getDefault().getValue(true);
        }

        return result.result().asBoolean();
    }
Injects a fake 'attachments' list into the superclass, for dumb plugins
which for some reason decided to add attachments via reflection.

The fake list proxies (some) calls back to the proper methods on this permissible.
bukkit/src/main/java/me/lucko/luckperms/bukkit/inject/permissible/LuckPermsPermissible.java