summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/MinecraftVersion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/minecraft/MinecraftVersion.cpp')
-rw-r--r--logic/minecraft/MinecraftVersion.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/logic/minecraft/MinecraftVersion.cpp b/logic/minecraft/MinecraftVersion.cpp
index 1451c39d..96d64d6d 100644
--- a/logic/minecraft/MinecraftVersion.cpp
+++ b/logic/minecraft/MinecraftVersion.cpp
@@ -77,6 +77,15 @@ QJsonDocument MinecraftVersion::toJson(bool saveOrder)
}
}
+QString MinecraftVersion::getUrl() const
+{
+ if(m_versionFileURL.isEmpty())
+ {
+ return QString("http://") + URLConstants::AWS_DOWNLOAD_VERSIONS + m_descriptor + "/" + m_descriptor + ".json";
+ }
+ return m_versionFileURL;
+}
+
VersionFilePtr MinecraftVersion::getVersionFile()
{
QFileInfo versionFile(QString("versions/%1/%1.dat").arg(m_descriptor));