Properly close file watcher on disable

https://github.com/lucko/LuckPerms/commit/5ce8217cd53a6540e0e9bd74a996538b55555059#r37466536
This commit is contained in:
Luck committed 2020-02-24 23:45:30 +00:00
1 parent 5ce8217cd5
commit e66ab1be0d
2 files changed
+7 -3

No files matched your search

@@ -232,7 +232,7 @@ public abstract class AbstractLuckPermsPlugin implements LuckPermsPlugin {
// close file watcher
if (this.fileWatcher != null) {
//this.fileWatcher.close();
this.fileWatcher.close();
}
// unregister api
@@ -183,7 +183,11 @@ public abstract class AbstractFileWatcher implements AutoCloseable {
}
@Override
public void close() throws IOException {
this.service.close();
public void close() {
try {
this.service.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}