public class MCP
extends java.lang.Object
Constructor and Description |
---|
MCP(java.lang.String clientURL,
java.lang.String clientSha1,
long clientSize)
Construct a new MCP object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClientSha1()
Return the client sha1.
|
long |
getClientSize()
Return the client size.
|
java.lang.String |
getClientURL()
Return the client url.
|
static @NotNull MCP |
getMCPFromJson(java.lang.String jsonUrl)
Provide an MCP instance from a JSON file.
|
static @NotNull MCP |
getMCPFromJson(java.net.URL jsonUrl)
Provide an MCP instance from a JSON file.
|
public MCP(java.lang.String clientURL, java.lang.String clientSha1, long clientSize)
clientURL
- URL of client.jarclientSha1
- SHA1 of client.jarclientSize
- Size (bytes) of client.jar@NotNull public static @NotNull MCP getMCPFromJson(java.net.URL jsonUrl)
{ "clientURL": "https://url.com/launcher/client.jar", "clientSha1": "9b0a9d70320811e7af2e8741653f029151a6719a", "clientSize": 1234 }
jsonUrl
- the JSON file URL.@NotNull public static @NotNull MCP getMCPFromJson(java.lang.String jsonUrl)
jsonUrl
- the JSON file URL.public java.lang.String getClientURL()
public java.lang.String getClientSha1()
public long getClientSize()