Class OreVersion

java.lang.Object
net.smoofyuniverse.ore.project.OreVersion

public class OreVersion extends Object
A version of a project on Ore.
  • Field Details

    • project

      public final OreProject project
      The project.
    • name

      public final String name
      The name of the version.
    • createdAt

      public final Instant createdAt
      The creation instant.
    • dependencies

      public final Map<String,String> dependencies
      The dependencies. Key: plugin id. Value: version, may be null.
  • Constructor Details

    • OreVersion

      public OreVersion(OreProject project, String name, Instant createdAt, Map<String,String> dependencies)
      Creates a version object.
      Parameters:
      project - The project.
      name - The name.
      createdAt - The creation instant.
      dependencies - The dependencies.
  • Method Details

    • getPage

      public Optional<String> getPage()
      Gets the URL of the version page.
      Returns:
      The URL as a string.
    • getLatest

      public static Optional<OreVersion> getLatest(OreVersion[] versions, Predicate<OreVersion> predicate)
      Gets the latest version matching the predicate.
      Parameters:
      versions - The versions to search in.
      predicate - The predicate.
      Returns:
      The latest version matching the predicate.