mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-15 23:04:45 +00:00
Annotate all the things
This commit is contained in:
63 files changed
+623
-369
No files matched your search
@@ -73,6 +73,7 @@ public class UpdateChecker {
|
||||
*
|
||||
* @return A list of mods that were both available on the URL and installed
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public static CompletableFuture<List<ModUpdateInfo>> fetchUpdatesAsync(String url) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
if (!LibraryConfig.ENABLE_UPDATE_CHECKER) {
|
||||
@@ -168,6 +169,7 @@ public class UpdateChecker {
|
||||
*
|
||||
* @throws UpdateCheckException If the update checker is disabled in config, the URL is invalid, or
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public static List<ModUpdateInfo> fetchUpdates(String url) throws UpdateCheckException {
|
||||
try {
|
||||
return fetchUpdatesAsync(url).join();
|
||||
@@ -190,6 +192,7 @@ public class UpdateChecker {
|
||||
*
|
||||
* @return A list of chat messages that can be sent to players
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public static List<IChatComponent> updateListToChatMessages(String initiator, List<ModUpdateInfo> updates) {
|
||||
if (updates == null || updates.size() == 0) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user