Added error message when exporting snapshots with curseforge

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-06-25 12:24:59 +03:00
parent 932531c8ba
commit fd5b155ee7
2 changed files with 19 additions and 8 deletions

View File

@ -1422,9 +1422,16 @@ void MainWindow::on_actionExportInstanceFlamePack_triggered()
if (m_selectedInstance) {
auto instance = dynamic_cast<MinecraftInstance*>(m_selectedInstance.get());
if (instance) {
QString errorMsg;
if (instance->getPackProfile()->getComponent("org.quiltmc.quilt-loader")) {
errorMsg = tr("Quilt is currently not supported by CurseForge modpacks.");
} else if (auto cmp = instance->getPackProfile()->getComponent("net.minecraft");
cmp && cmp->getVersionFile() && cmp->getVersionFile()->type == "snapshot") {
errorMsg = tr("Snapshots are currently not supported by CurseForge modpacks.");
}
if (!errorMsg.isEmpty()) {
QMessageBox msgBox;
msgBox.setText(tr("Quilt is currently not supported by CurseForge modpacks."));
msgBox.setText(errorMsg);
msgBox.exec();
return;
}