From 08fa8669d4ff3ec098688a3e85b58ee8e9e0eea4 Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Thu, 25 May 2023 18:08:02 -0400 Subject: Add docs to Utils and NEURepo --- src/main/java/me/xmrvizzy/skyblocker/utils/NEURepo.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/me/xmrvizzy/skyblocker/utils/NEURepo.java') diff --git a/src/main/java/me/xmrvizzy/skyblocker/utils/NEURepo.java b/src/main/java/me/xmrvizzy/skyblocker/utils/NEURepo.java index 027cfa7a..0de6cecd 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/utils/NEURepo.java +++ b/src/main/java/me/xmrvizzy/skyblocker/utils/NEURepo.java @@ -17,6 +17,9 @@ import java.nio.file.Path; import java.util.List; import java.util.concurrent.CompletableFuture; +/** + * Initializes the NEU repo, which contains item metadata and fairy souls location data. Clones the repo if it does not exist and checks for updates. Use {@link #runAsyncAfterLoad(Runnable)} to run code after the repo is initialized. + */ public class NEURepo { private static final Logger LOGGER = LoggerFactory.getLogger(NEURepo.class); public static final String REMOTE_REPO_URL = "https://github.com/NotEnoughUpdates/NotEnoughUpdates-REPO.git"; @@ -84,6 +87,11 @@ public class NEURepo { dir.delete(); } + /** + * Runs the given runnable after the NEU repo is initialized. + * @param runnable the runnable to run + * @return a completable future of the given runnable + */ public static CompletableFuture runAsyncAfterLoad(Runnable runnable) { return REPO_INITIALIZED.thenRunAsync(runnable); } -- cgit