Cuberite Forum

Full Version: Creating NBT file from plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Out of curiosity, is it possible to create an NBT file from inside a plugin? If so, what classes should I be looking at?
I don't think it is possible atm to create an NBT file from a plugin.
It is not possible. If you'd like, you might want to explore the cFastNBTWriter and cParsedNBT classes, if their interface is exportable to Lua (but I doubt it); and anyway NBT files are usually compressed with gzip or zlib, too, so that would take some extra handling.

Note, however, that there's one exception to this. MCServer plugins can read and write .schematic files, which are NBT inside. Use the cBlockArea class for that:
http://mc-server.xoft.cz/LuaAPI/cBlockArea.html