mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-14 16:04:40 +01:00
Forgot config check
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user