mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-21 04:49:51 +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 {
|
private static URL getResourceForgeHack(String location) throws IOException {
|
||||||
try {
|
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) {
|
} catch (Exception e) {
|
||||||
throw new IOException("Could not find " + location);
|
throw new IOException("Could not find " + location);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user