public LoadedSubject loadFromFile(Path file) throws IOException {
        if (!Files.exists(file)) {
            return null;
        }

        String fileName = file.getFileName().toString();
        String subjectName = fileName.substring(0, fileName.length() - ".json".length());

        try (BufferedReader reader = Files.newBufferedReader(file, StandardCharsets.UTF_8)) {
            JsonObject data = GsonProvider.prettyPrinting().fromJson(reader, JsonObject.class);
            SubjectDataContainer model = SubjectDataContainer.deserialize(this.service, data);
            return new LoadedSubject(subjectName, model);
        } catch (Exception e) {
            throw new IOException("Exception occurred whilst loading from " + file.toString(), e);
        }
    }
Loads a subject from a particular file

@param file the file to load from
@return a loaded subject
@throws IOException if the read fails
sponge/src/main/java/me/lucko/luckperms/sponge/service/model/persisted/SubjectStorage.java