Skip to content

Commit 74a4387

Browse files
committed
Quiet down errors related to modders not changing their update urls from the default.
1 parent 7542fbe commit 74a4387

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎mdk/src/main/resources/META-INF/mods.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ loaderVersion="[@FORGE_SPEC_VERSION@,)" #mandatory This is typically bumped ever
1111
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
1212
license="All rights reserved"
1313
# A URL to refer people to when problems occur with this mod
14-
issueTrackerURL="http://my.issue.tracker/" #optional
14+
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
1515
# A list of mods - how many allowed here is determined by the individual mod loader
1616
[[mods]] #mandatory
1717
# The modid of the mod
@@ -22,10 +22,10 @@ modId="examplemod" #mandatory
2222
version="${file.jarVersion}" #mandatory
2323
# A display name for the mod
2424
displayName="Example Mod" #mandatory
25-
# A URL to query for updates for this mod. See the JSON update specification <here>
26-
updateJSONURL="http://myurl.me/" #optional
25+
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
26+
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
2727
# A URL for the "homepage" for this mod, displayed in the mod UI
28-
displayURL="http://example.com/" #optional
28+
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional
2929
# A file name (in the root of the mod JAR) containing a logo for display
3030
logoFile="examplemod.png" #optional
3131
# A text field displayed in the mod UI

‎src/fmllauncher/java/net/minecraftforge/fml/loading/StringUtils.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public static boolean endsWith(final String search, final String... endings) {
4242
}
4343

4444
public static URL toURL(final String string) {
45-
try
46-
{
47-
return new URL(string);
48-
}
49-
catch (MalformedURLException e)
50-
{
45+
if (string == null || string.trim().isEmpty() || string.contains("myurl.me") || string.contains("example.invalid"))
46+
return null;
47+
48+
try {
49+
return new URL(string); }
50+
catch (MalformedURLException e) {
5151
throw new RuntimeException(e);
5252
}
5353
}

0 commit comments

Comments
 (0)