public void register(Path directory) throws IOException {
        final WatchKey key = register(this.service, directory);
        this.keys.put(key, directory);
    }
Register a watch key in the given directory.

@param directory the directory
@throws IOException if unable to register a key
common/src/main/java/me/lucko/luckperms/common/storage/implementation/file/watcher/AbstractFileWatcher.java