[Forge] Fix loading language files in prod env

This commit is contained in:
Octavia Togami 2020-10-24 18:05:23 -07:00
parent 88076f93f0
commit c0a1e318c4
No known key found for this signature in database
GPG Key ID: CC364524D1983C99

View File

@ -33,7 +33,14 @@ public ForgeResourceLoader(WorldEdit worldEdit) {
private static URL getResourceForgeHack(String location) throws IOException {
try {
return new URL("modjar://worldedit/" + location);
URL url = new URL("modjar://worldedit/" + location);
try {
url.openStream();
} catch (IOException e) {
// doesn't actually exist
return null;
}
return url;
} catch (Exception e) {
throw new IOException("Could not find " + location);
}