diff --git a/.gitignore b/.gitignore index 7cb2ea7..eaf8d5f 100644 --- a/.gitignore +++ b/.gitignore @@ -39,8 +39,8 @@ build/ .DS_Store ### Other Stuff ### -**/resources/config*.json -!**/resources/config.example.json +config*.json +config.example.json !**/resources/config.schema.json ### why would this not be here already ### diff --git a/src/main/java/net/hypr/doki/Config.java b/src/main/java/net/hypr/doki/Config.java index c6b233e..28bcbf8 100644 --- a/src/main/java/net/hypr/doki/Config.java +++ b/src/main/java/net/hypr/doki/Config.java @@ -22,8 +22,7 @@ public class Config { */ public static Config readConfig() throws IOException { Logger log = Logging.getLogger(); - try (InputStream in=Thread.currentThread().getContextClassLoader().getResourceAsStream("config.json")) { - assert in != null; + try (InputStream in = new FileInputStream("./config.json")) { Reader reader = new InputStreamReader(in, StandardCharsets.UTF_8); log.info("Loaded config"); return new Gson().fromJson(reader, Config.class);