diff --git a/src/main/java/emu/grasscutter/Grasscutter.java b/src/main/java/emu/grasscutter/Grasscutter.java index 8c3248dd7..0c64a3d4b 100644 --- a/src/main/java/emu/grasscutter/Grasscutter.java +++ b/src/main/java/emu/grasscutter/Grasscutter.java @@ -29,13 +29,15 @@ import lombok.*; import org.jline.reader.*; import org.jline.terminal.*; import org.reflections.Reflections; +import org.reflections.util.ConfigurationBuilder; +import org.reflections.util.FilterBuilder; import org.slf4j.LoggerFactory; public final class Grasscutter { public static final File configFile = new File("./config.json"); - public static final Reflections reflector = new Reflections("emu.grasscutter"); @Getter private static final Logger logger = (Logger) LoggerFactory.getLogger(Grasscutter.class); + public static final Reflections reflector; @Getter public static ConfigContainer config; @Getter @Setter private static Language language; @@ -75,6 +77,15 @@ public final class Grasscutter { var mongoLogger = (Logger) LoggerFactory.getLogger("org.mongodb.driver"); mongoLogger.setLevel(Level.OFF); + // Configure the reflector. + reflector = new Reflections( + new ConfigurationBuilder() + .forPackage("emu.grasscutter") + .filterInputsBy(new FilterBuilder() + .includePackage("emu.grasscutter") + .excludePackage("emu.grasscutter.net.proto")) + ); + // Load server configuration. Grasscutter.loadConfig(); // Attempt to update configuration.