Search in sources :

Example 1 with DependencyResolutionFailedException

use of org.terasology.engine.module.DependencyResolutionFailedException in project Terasology by MovingBlocks.

the class SelectModulesScreen 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));
}
Also used : ConfirmPopup(org.terasology.rendering.nui.layers.mainMenu.ConfirmPopup) DependencyResolutionFailedException(org.terasology.engine.module.DependencyResolutionFailedException) MessagePopup(org.terasology.rendering.nui.layers.mainMenu.MessagePopup) Module(org.terasology.module.Module)

Aggregations

DependencyResolutionFailedException (org.terasology.engine.module.DependencyResolutionFailedException)1 Module (org.terasology.module.Module)1 ConfirmPopup (org.terasology.rendering.nui.layers.mainMenu.ConfirmPopup)1 MessagePopup (org.terasology.rendering.nui.layers.mainMenu.MessagePopup)1