Class Library

java.lang.Object
org.moddingx.launcherlib.launcher.Library

public class Library extends Object
A library for the game.
  • Constructor Details

  • Method Details

    • key

      public String key()
      Gets the unique library key.
    • path

      public String path()
      Gets the path inside a library structure to download that library to.
    • artifact

      public Artifact artifact()
      Gets the artifact, this library describes.
    • shouldDownloadOn

      public boolean shouldDownloadOn(String os)
      Gets whether this library should be downloaded on the given operating system. os should be one of windows, osx and linux.
    • openStream

      public InputStream openStream() throws IOException
      Opens an InputStream to download the library.
      Throws:
      IOException
    • download

      public void download(Path basePath) throws IOException
      Downloads the library to basePath.resolve(path()).
      Throws:
      IOException