--- title: "Library API - BuildPrint wiki" description: "Save a loaded build to the player's schematics folder." url: https://voxelsprout.com/buildprint/wiki/library-api --- [BuildPrint](https://voxelsprout.com/buildprint) [Wiki](https://voxelsprout.com/buildprint/wiki)Library API # Library API Save a loaded build to the player's schematics folder. Save any loaded build as a `.litematic` in the schematics folder, as if the player had saved it. Most useful with [previews](https://voxelsprout.com/buildprint/wiki/previews-api), which have no file until one is saved. From BuildPrint **0.1.19**. ```java boolean started = BuildprintLibrary.save("mymod", id, "Castle restyled", path -> { if (path != null) player.displayClientMessage(Component.literal("Saved " + path), true); }); ``` ## Good to know * It never writes over a file. When the name is taken, the new file gets a number. * Characters a file name cannot hold, and spaces, become `_`. * It saves the blueprint as it is now, before turning. Blocks the player swapped in BuildPrint are saved as the blueprint's own blocks. * The file is written off the client thread. The callback runs on the client thread once it is on disk. * The player is not told. Tell them yourself if they asked for the save. ## Reference | BuildprintLibrary | What it does | | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | isAvailable() | In a world. | | save(String owner, int id, String name, Consumer done) | Write the build to .litematic. done gets the path inside the schematics folder, or null when writing failed. Returns false, without calling done, when there is no such build. | [Previous Previews API](https://voxelsprout.com/buildprint/wiki/previews-api) [Next Selection API](https://voxelsprout.com/buildprint/wiki/selection-api) Something missing or wrong on this page? Say so on [Discord](https://discord.gg/CvdkGbEW4y).