code: public Optional<File> get(InstalledPlugin plugin) {
      // Does not fail if another process tries to create the directory at the same time.
      File jarInCache = jarInCache(plugin.key, plugin.hash);
      if (jarInCache.exists() && jarInCache.isFile()) {
        return Optional.of(jarInCache);
      }
      return download(plugin);
    }
docs: Get the JAR file of specified plugin. If not present in user local cache,
  then it's downloaded from server and added to cache.
  
  @return the file, or {@link Optional#empty()} if plugin not found (404 HTTP code)
  @throws IllegalStateException if the plugin can't be downloaded (not 404 nor 2xx HTTP codes)
  or can't be cached locally.