Class PolymartVersionChecker
java.lang.Object
me.hsgamer.hscore.checker.polymart.PolymartVersionChecker
- All Implemented Interfaces:
VersionChecker
A simple version checker for Polymart
-
Constructor Summary
ConstructorDescriptionPolymartVersionChecker
(int resourceId) Create a version checkerPolymartVersionChecker
(int resourceId, UserAgent userAgent) Create a version checker -
Method Summary
Modifier and TypeMethodDescription@NotNull CompletableFuture<String>
Get the versionstatic boolean
Check whether the checker can be usedstatic boolean
isAvailable
(String identifier) Check whether the checker can be used
-
Constructor Details
-
PolymartVersionChecker
Create a version checker- Parameters:
resourceId
- the resource id from PolymartuserAgent
- the user agent
-
PolymartVersionChecker
public PolymartVersionChecker(int resourceId) Create a version checker- Parameters:
resourceId
- the resource id from Polymart
-
-
Method Details
-
isAvailable
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
Description copied from interface:VersionChecker
Get the version- Specified by:
getVersion
in interfaceVersionChecker
- Returns:
- the version
-