Class Mod
java.lang.Object
fr.flowarg.flowupdater.download.json.Mod
- Direct Known Subclasses:
CurseModPack.CurseModPackMod
This class represents a Mod object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ModfromJson(com.google.gson.JsonElement modElement) Get the mod url.getModsFromJson(String jsonUrl) Provide a List of Mods from a JSON file.getModsFromJson(URL jsonUrl) Provide a List of Mods from a JSON file.getName()Get the mod name.getSha1()Get the sha1 of the mod.longgetSize()Get the mod size.
-
Constructor Details
-
Mod
Construct a new Mod object.- Parameters:
name- Name of mod file.downloadURL- Mod download URL.sha1- Sha1 of mod file.size- Size of mod file.
-
-
Method Details
-
getModsFromJson
Provide a List of Mods from a JSON file. Template of a JSON file :{ "mods": [ { "name": "KeyStroke", "downloadURL": "https://url.com/launcher/mods/KeyStroke.jar", "sha1": "70e564892989d8bbc6f45c895df56c5db9378f48", "size": 1234 }, { "name": "JourneyMap", "downloadURL": "https://url.com/launcher/mods/JourneyMap.jar", "sha1": "eef74b3fbab6400cb14b02439cf092cca3c2125c", "size": 1234 } ] }- Parameters:
jsonUrl- the JSON file URL.- Returns:
- a Mod list.
-
fromJson
-
getModsFromJson
Provide a List of Mods from a JSON file. Template of a JSON file :- Parameters:
jsonUrl- the JSON file URL.- Returns:
- a Mod list.
-
getName
Get the mod name.- Returns:
- the mod name.
-
getSha1
Get the sha1 of the mod.- Returns:
- the sha1 of the mod.
-
getSize
public long getSize()Get the mod size.- Returns:
- the mod size.
-
getDownloadURL
Get the mod url.- Returns:
- the mod url.
-