Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
28a070f1
Commit
28a070f1
authored
Apr 20, 2022
by
Benjamin Elsdon
Browse files
Forgot config check
parent
d59799ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/gacha/GachaManager.java
View file @
28a070f1
...
...
@@ -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
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment