Skip to content

Commit

Permalink
Output "Searching for mod updates..." after starting the update command
Browse files Browse the repository at this point in the history
  • Loading branch information
NebelNidas committed Oct 26, 2021
1 parent d9388b6 commit 1f3d175
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@ public void run() {
return;
}

player.sendMessage(new TranslatableText(String.format("commands.%s.searching_for_updates", Modget.NAMESPACE))
.formatted(Formatting.YELLOW), false
);

for (RecognizedMod mod : ModVersionUtilsImpl.create().getModsWithUpdates(Modget.MODGET_MANAGER.getRecognizedMods(), Utils.getMinecraftVersion().getName())) {
for (ModVersion update : mod.getUpdates()) {
Package pack = update.getParentManifest().getParentPackage();

if (updatesCount == 0) {
player.sendMessage(new TranslatableText(String.format("commands.%s.%s_title", Modget.NAMESPACE, COMMAND))
player.sendMessage(new TranslatableText(String.format("commands.%s.%s_title", Modget.NAMESPACE, COMMAND))
.formatted(Formatting.YELLOW), false
);
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/modget/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"commands.modget.search_no_mods_found_enter_at_least_4_chars": "No mods have been found. Enter at least 4 characters to get a more extensive search!",
"commands.modget.list_title": "Recognized Mods:",
"commands.modget.repos_list_title": "Installed Mod Repositories:",
"commands.modget.upgrade_title": "Available Mod Updates:",
"commands.modget.upgrade_title": "These updates have been found:",
"commands.modget.searching_for_updates": "Searching for mod updates...",
"commands.modget.no_updates_found": "No mod updates have been found.",
"info.modget.multiple_packages_available": "There are multiple packages available for the mod %s:",
"info.modget.use_for_server_mods": "Note: Use \"%s\" for server mods.",
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/data/modget/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"commands.modget.search_no_mods_found_enter_at_least_4_chars": "No mods have been found. Enter at least 4 characters to get a more extensive search!",
"commands.modget.list_title": "Recognized Mods:",
"commands.modget.repos_list_title": "Installed Mod Repositories:",
"commands.modget.upgrade_title": "Available Mod Updates:",
"commands.modget.upgrade_title": "These updates have been found:",
"commands.modget.searching_for_updates": "Searching for mod updates...",
"commands.modget.no_updates_found": "No mod updates have been found.",
"info.modget.multiple_packages_available": "There are multiple packages available for the mod %s:",
"info.modget.use_for_server_mods": "Note: Use \"%s\" for server mods.",
Expand Down

0 comments on commit 1f3d175

Please sign in to comment.