Properly close file watcher on disable

5ce8217cd5 (r37466536)
This commit is contained in:
Luck 2020-02-24 23:45:30 +00:00
parent 5ce8217cd5
commit e66ab1be0d
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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();
}
}
}