Commit 28a070f1 authored by Benjamin Elsdon's avatar Benjamin Elsdon
Browse files

Forgot config check

parent d59799ce
......@@ -296,16 +296,18 @@ public class GachaManager {
@Subscribe
public synchronized void watchBannerJson(GameServerTickEvent tickEvent) {
try {
for (WatchEvent<?> event : watchKey.pollEvents()) {
final Path changed = (Path) event.context();
if (changed.endsWith("Banners.json")) {
Grasscutter.getLogger().info("Change detected with banners.json. Reloading gacha config");
this.load();
if(Grasscutter.getConfig().getServerOptions().WatchGacha) {
try {
for (WatchEvent<?> event : watchKey.pollEvents()) {
final Path changed = (Path) event.context();
if (changed.endsWith("Banners.json")) {
Grasscutter.getLogger().info("Change detected with banners.json. Reloading gacha config");
this.load();
}
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment