@Override
    public User loadUser(UUID uniqueId, String username) throws IOException {
        User user = this.plugin.getUserManager().getOrMake(uniqueId, username);
        try {
            ConfigurationNode file = readFile(StorageLocation.USERS, uniqueId.toString());
            if (file != null) {
                String name = file.getNode("name").getString();
                String primaryGroup = file.getNode(this.loader instanceof JsonLoader ? "primaryGroup" : "primary-group").getString();

                user.getPrimaryGroup().setStoredValue(primaryGroup);
                user.setUsername(name, true);

                user.loadNodesFromStorage(readNodes(file));
                this.plugin.getUserManager().giveDefaultIfNeeded(user);

                boolean updatedUsername = user.getUsername().isPresent() && (name == null || !user.getUsername().get().equalsIgnoreCase(name));
                if (updatedUsername | user.auditTemporaryNodes()) {
                    saveUser(user);
                }
            } else {
                if (this.plugin.getUserManager().isNonDefaultUser(user)) {
                    user.loadNodesFromStorage(Collections.emptyList());
                    user.getPrimaryGroup().setStoredValue(null);
                    this.plugin.getUserManager().giveDefaultIfNeeded(user);
                }
            }
        } catch (Exception e) {
            throw new FileIOException(uniqueId.toString(), e);
        }
        return user;
    }
Saves a configuration node to the given location

@param location the location
@param name the name of the object
@param node the node
@throws IOException if an io error occurs
common/src/main/java/me/lucko/luckperms/common/storage/implementation/file/AbstractConfigurateStorage.java