mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-11 20:47:32 +00:00
use the config in the dependency loader for toggling downloads
This commit is contained in:
1 file changed
+10
@@ -15,6 +15,8 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
|
||||
import com.falsepattern.lib.internal.LibraryConfig;
|
||||
import lombok.Builder;
|
||||
import lombok.NonNull;
|
||||
import lombok.val;
|
||||
@@ -127,6 +129,14 @@ public class DependencyLoader {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!LibraryConfig.ENABLE_LIBRARY_DOWNLOADS) {
|
||||
val errorMessage = "Failed to load library " + groupId + ":" + artifactId + ":" + preferredVersion +
|
||||
((suffix != null) ? ":" + suffix : "") + ": FalsePatternLib library downloading has " +
|
||||
"been disabled in the config, and the library is not present on disk! Requested by mod: " +
|
||||
loadingModId;
|
||||
FalsePatternLib.getLog().fatal(errorMessage);
|
||||
throw new IllegalStateException(errorMessage);
|
||||
}
|
||||
for (var repo : mavenRepositories) {
|
||||
try {
|
||||
if (!repo.endsWith("/")) {
|
||||
|
||||
Reference in new issue
Block a user