Quiet down errors related to modders not changing their update urls from the default.
This commit is contained in:
parent
7542fbea48
commit
74a43877e4
|
@ -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.
|
# 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"
|
license="All rights reserved"
|
||||||
# A URL to refer people to when problems occur with this mod
|
# 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
|
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||||
[[mods]] #mandatory
|
[[mods]] #mandatory
|
||||||
# The modid of the mod
|
# The modid of the mod
|
||||||
|
@ -22,10 +22,10 @@ modId="examplemod" #mandatory
|
||||||
version="${file.jarVersion}" #mandatory
|
version="${file.jarVersion}" #mandatory
|
||||||
# A display name for the mod
|
# A display name for the mod
|
||||||
displayName="Example Mod" #mandatory
|
displayName="Example Mod" #mandatory
|
||||||
# A URL to query for updates for this mod. See the JSON update specification <here>
|
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
|
||||||
updateJSONURL="http://myurl.me/" #optional
|
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
|
||||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
# 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
|
# A file name (in the root of the mod JAR) containing a logo for display
|
||||||
logoFile="examplemod.png" #optional
|
logoFile="examplemod.png" #optional
|
||||||
# A text field displayed in the mod UI
|
# A text field displayed in the mod UI
|
||||||
|
|
|
@ -42,12 +42,12 @@ public class StringUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
public static URL toURL(final String string) {
|
public static URL toURL(final String string) {
|
||||||
try
|
if (string == null || string.trim().isEmpty() || string.contains("myurl.me") || string.contains("example.invalid"))
|
||||||
{
|
return null;
|
||||||
return new URL(string);
|
|
||||||
}
|
try {
|
||||||
catch (MalformedURLException e)
|
return new URL(string); }
|
||||||
{
|
catch (MalformedURLException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue