Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit e241a95

Browse files
authored
Update AdvancedChatCore.java
Adding fix for quilt
1 parent 0d556e1 commit e241a95

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/io/github/darkkronicle/advancedchatcore/AdvancedChatCore.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,11 @@ public void onInitializeClient() {
8686
*/
8787
public static InputStream getResource(String path) throws URISyntaxException, IOException {
8888
URI uri = Thread.currentThread().getContextClassLoader().getResource(path).toURI();
89-
if (uri.getScheme().contains("jar")) {
90-
// Not IDE
91-
// jar.toString() begins with file:
92-
// i want to trim it out...
89+
if (!uri.getScheme().equals("file")) {
90+
// it's not a file
9391
return Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
9492
} else {
95-
// IDE
93+
// it's a file - try to access it directly!
9694
return new FileInputStream(Paths.get(uri).toFile());
9795
}
9896
}

0 commit comments

Comments
 (0)