From 0ee93d0237f29f7ee296fd694c260dba58a92a67 Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Sat, 5 Aug 2023 23:11:39 +1000 Subject: Some changes to the backup repo (#796) * maybe fix the backup repo not working sometimes * change wording --- src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index c60e7317..9d81c6ed 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -151,6 +151,7 @@ public class NEUManager { public CraftingOverlay craftingOverlay; private static boolean repoDownloadFailed = false; + public boolean onBackupRepo = false; public NEUManager(NotEnoughUpdates neu, File configLocation) { this.neu = neu; @@ -278,6 +279,7 @@ public class NEUManager { */ public void switchToBackupRepo() { Path destination = new File(repoLocation, "neu-items-master.zip").toPath(); + onBackupRepo = true; try ( InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream( @@ -1584,6 +1586,8 @@ public class NEUManager { }) .exceptionally(ex -> { ex.printStackTrace(); + System.out.println("switching over to the backup repo"); + switchToBackupRepo(); return Arrays.asList( "§cRepository not fully reloaded.", "§cThere was an error reloading your repository.", -- cgit