Search in sources :

Example 1 with ResourcePackUpdateCompleteEvent

use of gg.projecteden.nexus.features.resourcepack.models.events.ResourcePackUpdateCompleteEvent in project Nexus by ProjectEdenGG.

the class ResourcePack method read.

public static void read() {
    Tasks.async(() -> {
        try {
            new ResourcePackUpdateStartEvent().callEvent();
            reloading = true;
            HttpUtils.saveFile(URL, FILE_NAME);
            openZip();
            setup();
            readAllFiles();
            CustomModelMenu.load();
            reloading = false;
            new ResourcePackUpdateCompleteEvent().callEvent();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            closeZip();
        }
    });
}
Also used : ResourcePackUpdateStartEvent(gg.projecteden.nexus.features.resourcepack.models.events.ResourcePackUpdateStartEvent) ResourcePackUpdateCompleteEvent(gg.projecteden.nexus.features.resourcepack.models.events.ResourcePackUpdateCompleteEvent) FileSystemNotFoundException(java.nio.file.FileSystemNotFoundException)

Aggregations

ResourcePackUpdateCompleteEvent (gg.projecteden.nexus.features.resourcepack.models.events.ResourcePackUpdateCompleteEvent)1 ResourcePackUpdateStartEvent (gg.projecteden.nexus.features.resourcepack.models.events.ResourcePackUpdateStartEvent)1 FileSystemNotFoundException (java.nio.file.FileSystemNotFoundException)1