We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28085e5 commit 2e6d9dfCopy full SHA for 2e6d9df
src/main/java/me/lucko/scriptcontroller/internal/ScriptLoaderImpl.java
@@ -289,17 +289,19 @@ private void reload() {
289
// handle init of new scripts & cleanup of old ones
290
Executor runExecutor = this.environment.getSettings().getRunExecutor();
291
runExecutor.execute(() -> {
292
+ // terminate old scripts
293
+ CompositeAutoClosable.create()
294
+ .bindAll(toTerminate)
295
+ .closeAndReportExceptions();
296
+
297
+ // init new/reloaded scripts
298
for (ScriptImpl script : toRun) {
299
try {
300
script.run();
301
} catch (Exception e) {
302
e.printStackTrace();
303
}
304
-
- CompositeAutoClosable.create()
- .bindAll(toTerminate)
- .closeAndReportExceptions();
305
});
306
307
0 commit comments