private static void writeAttributesTo(ConfigurationNode attributes, Node node, boolean writeValue) {
        if (writeValue) {
            attributes.getNode("value").setValue(node.getValue());
        }

        if (node.hasExpiry()) {
            attributes.getNode("expiry").setValue(node.getExpiry().getEpochSecond());
        }

        if (!node.getContexts().isEmpty()) {
            attributes.getNode("context").setValue(ContextSetConfigurateSerializer.serializeContextSet(node.getContexts()));
        }
    }
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