diff --git a/src/main/java/carpet/script/utils/AppStoreManager.java b/src/main/java/carpet/script/utils/AppStoreManager.java index bb714687..8f66a032 100644 --- a/src/main/java/carpet/script/utils/AppStoreManager.java +++ b/src/main/java/carpet/script/utils/AppStoreManager.java @@ -59,6 +59,11 @@ public class AppStoreManager { @Override public String validate(CommandSourceStack source, CarpetRule currentRule, String newValue, String stringInput) { + if (newValue.equals(currentRule.value())) { + // Don't refresh the local repo if it's the same (world change), helps preventing hitting rate limits from github when + // getting suggestions. Pending is a way to invalidate the cache when it gets old, and investigating api usage further + return newValue; + } APP_STORE_ROOT = StoreNode.folder(null, ""); if (newValue.equalsIgnoreCase("none")) {