Class PolymartVersionChecker

java.lang.Object
me.hsgamer.hscore.checker.polymart.PolymartVersionChecker
All Implemented Interfaces:
VersionChecker

public class PolymartVersionChecker extends Object implements VersionChecker
A simple version checker for Polymart
  • Constructor Details

    • PolymartVersionChecker

      public PolymartVersionChecker(int resourceId, UserAgent userAgent)
      Create a version checker
      Parameters:
      resourceId - the resource id from Polymart
      userAgent - the user agent
    • PolymartVersionChecker

      public PolymartVersionChecker(int resourceId)
      Create a version checker
      Parameters:
      resourceId - the resource id from Polymart
  • Method Details

    • isAvailable

      public static boolean isAvailable(String identifier)
      Check whether the checker can be used
      Parameters:
      identifier - the identifier
      Returns:
      true if it can be used
    • isAvailable

      public static boolean isAvailable()
      Check whether the checker can be used
      Returns:
      true if it can be used
    • getVersion

      @NotNull public @NotNull CompletableFuture<String> getVersion()
      Description copied from interface: VersionChecker
      Get the version
      Specified by:
      getVersion in interface VersionChecker
      Returns:
      the version