diff options
author | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2023-05-25 18:08:02 -0400 |
---|---|---|
committer | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2023-06-22 11:33:38 +0800 |
commit | 08fa8669d4ff3ec098688a3e85b58ee8e9e0eea4 (patch) | |
tree | 475bab6d470bdc922f00e7e3741345b6cb98d128 /src/main/java/me/xmrvizzy/skyblocker/utils/NEURepo.java | |
parent | 284518527393aa3363c15119c41d28f863122e37 (diff) | |
download | Skyblocker-08fa8669d4ff3ec098688a3e85b58ee8e9e0eea4.tar.gz Skyblocker-08fa8669d4ff3ec098688a3e85b58ee8e9e0eea4.tar.bz2 Skyblocker-08fa8669d4ff3ec098688a3e85b58ee8e9e0eea4.zip |
Add docs to Utils and NEURepo
Diffstat (limited to 'src/main/java/me/xmrvizzy/skyblocker/utils/NEURepo.java')
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/utils/NEURepo.java | 8 |
1 files changed, 8 insertions, 0 deletions
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<Void> runAsyncAfterLoad(Runnable runnable) { return REPO_INITIALIZED.thenRunAsync(runnable); } |