mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-27 06:02:57 +08:00
Forgot config check
This commit is contained in:
parent
c08a341b20
commit
a498b81a24
@ -296,16 +296,18 @@ public class GachaManager {
|
|||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public synchronized void watchBannerJson(GameServerTickEvent tickEvent) {
|
public synchronized void watchBannerJson(GameServerTickEvent tickEvent) {
|
||||||
try {
|
if(Grasscutter.getConfig().getServerOptions().WatchGacha) {
|
||||||
for (WatchEvent<?> event : watchKey.pollEvents()) {
|
try {
|
||||||
final Path changed = (Path) event.context();
|
for (WatchEvent<?> event : watchKey.pollEvents()) {
|
||||||
if (changed.endsWith("Banners.json")) {
|
final Path changed = (Path) event.context();
|
||||||
Grasscutter.getLogger().info("Change detected with banners.json. Reloading gacha config");
|
if (changed.endsWith("Banners.json")) {
|
||||||
this.load();
|
Grasscutter.getLogger().info("Change detected with banners.json. Reloading gacha config");
|
||||||
|
this.load();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user