Commits

Doc authored 668e05a24d8
Allow piston-data.mojang.com in VersionInfo#hashFromUrl
No tags
master

src/main/java/org/spigotmc/builder/VersionInfo.java

Modified
48 48
49 49 public String getShaServerHash()
50 50 {
51 51 return hashFromUrl( serverUrl );
52 52 }
53 53
54 54 public String getShaMappingsHash()
55 55 {
56 56 return hashFromUrl( mappingsUrl );
57 57 }
58 - private static final Pattern URL_PATTERN = Pattern.compile( "https://launcher.mojang.com/v1/objects/([0-9a-f]{40})/.*" );
58 + private static final Pattern URL_PATTERN = Pattern.compile( "https://(?:launcher|piston-data).mojang.com/v1/objects/([\\da-f]{40})/.*" );
59 59
60 60 public static String hashFromUrl(String url)
61 61 {
62 62 if ( url == null )
63 63 {
64 64 return null;
65 65 }
66 66
67 67 Matcher match = URL_PATTERN.matcher( url );
68 68 return ( match.find() ) ? match.group( 1 ) : null;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut