Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.terraformersmc.modmenu.api;

import org.jetbrains.annotations.Nullable;

public interface UpdateChecker {
/**
* Gets called when ModMenu is checking for updates.
Expand All @@ -9,5 +11,5 @@ public interface UpdateChecker {
*
* @return The update info
*/
UpdateInfo checkForUpdates();
@Nullable UpdateInfo checkForUpdates();
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,11 @@ private static void checkForUpdates0() {
Thread.currentThread().setName("ModMenu/Update Checker/%s".formatted(mod.getName()));

var update = updateChecker.checkForUpdates();
mod.setUpdateInfo(update);

if (update == null) {
return;
if (update != null && update.isUpdateAvailable()) {
LOGGER.info("Update available for '{}@{}'", mod.getId(), mod.getVersion());
}

mod.setUpdateInfo(update);
LOGGER.info("Update available for '{}@{}'", mod.getId(), mod.getVersion());
});
}
}
Expand Down