diff --git a/mdk/src/main/resources/META-INF/mods.toml b/mdk/src/main/resources/META-INF/mods.toml index 2c950c2c9..472db367d 100644 --- a/mdk/src/main/resources/META-INF/mods.toml +++ b/mdk/src/main/resources/META-INF/mods.toml @@ -11,7 +11,7 @@ loaderVersion="[@FORGE_SPEC_VERSION@,)" #mandatory This is typically bumped ever # Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. license="All rights reserved" # A URL to refer people to when problems occur with this mod -issueTrackerURL="http://my.issue.tracker/" #optional +#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod @@ -22,10 +22,10 @@ modId="examplemod" #mandatory version="${file.jarVersion}" #mandatory # A display name for the mod displayName="Example Mod" #mandatory -# A URL to query for updates for this mod. See the JSON update specification -updateJSONURL="http://myurl.me/" #optional +# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ +#updateJSONURL="https://change.me.example.invalid/updates.json" #optional # A URL for the "homepage" for this mod, displayed in the mod UI -displayURL="http://example.com/" #optional +#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional # A file name (in the root of the mod JAR) containing a logo for display logoFile="examplemod.png" #optional # A text field displayed in the mod UI diff --git a/src/fmllauncher/java/net/minecraftforge/fml/loading/StringUtils.java b/src/fmllauncher/java/net/minecraftforge/fml/loading/StringUtils.java index 9c738cfd2..0a268c9eb 100644 --- a/src/fmllauncher/java/net/minecraftforge/fml/loading/StringUtils.java +++ b/src/fmllauncher/java/net/minecraftforge/fml/loading/StringUtils.java @@ -42,12 +42,12 @@ public class StringUtils } public static URL toURL(final String string) { - try - { - return new URL(string); - } - catch (MalformedURLException e) - { + if (string == null || string.trim().isEmpty() || string.contains("myurl.me") || string.contains("example.invalid")) + return null; + + try { + return new URL(string); } + catch (MalformedURLException e) { throw new RuntimeException(e); } }