use of org.terasology.engine.core.module.DependencyResolutionFailedException in project Terasology by MovingBlocks.
the class ModuleDetailsScreen method startDownloadingNewestModulesRequiredFor.
private void startDownloadingNewestModulesRequiredFor(final DependencyInfo dependencyInfo) {
final Set<Module> modulesToDownload;
try {
modulesToDownload = moduleManager.getInstallManager().getAllModulesToDownloadFor(dependencyInfo.getId());
} catch (DependencyResolutionFailedException ex) {
MessagePopup messagePopup = getManager().pushScreen(MessagePopup.ASSET_URI, MessagePopup.class);
messagePopup.setMessage("Error", ex.getMessage());
return;
}
final ConfirmPopup confirmPopup = getManager().pushScreen(ConfirmPopup.ASSET_URI, ConfirmPopup.class);
confirmPopup.setMessage("Confirm Download", modulesToDownload.size() + " modules will be downloaded");
confirmPopup.setOkHandler(() -> downloadModules(modulesToDownload));
}
use of org.terasology.engine.core.module.DependencyResolutionFailedException in project Terasology by MovingBlocks.
the class AdvancedGameSetupScreen method startDownloadingNewestModulesRequiredFor.
private void startDownloadingNewestModulesRequiredFor(ModuleSelectionInfo moduleMetadata) {
Set<Module> modulesToDownload;
try {
modulesToDownload = moduleManager.getInstallManager().getAllModulesToDownloadFor(moduleMetadata.getMetadata().getId());
} catch (DependencyResolutionFailedException ex) {
MessagePopup messagePopup = getManager().pushScreen(MessagePopup.ASSET_URI, MessagePopup.class);
messagePopup.setMessage("Error", ex.getMessage());
return;
}
ConfirmPopup confirmPopup = getManager().pushScreen(ConfirmPopup.ASSET_URI, ConfirmPopup.class);
confirmPopup.setMessage("Confirm Download", modulesToDownload.size() + " modules will be downloaded");
confirmPopup.setOkHandler(() -> downloadModules(modulesToDownload));
}
Aggregations