mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-15 04:41:37 +08:00
[Forge] Fix loading language files in prod env
This commit is contained in:
parent
88076f93f0
commit
c0a1e318c4
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user