NBT Editor

NBT Editor

30k Downloads

Make .nbt file names based off Item Name or Command Args

KadTheHunter opened this issue ยท 2 comments

commented

The feature of saving items to a .nbt file is absolutely amazing, but with one small annoyance: the file names are just the date and time of when you saved the file, meaning you have to rename the files as you save them, unless you want a jumble of files with no indication as to what is what.

I suggest one or both of the following:

  • Make .nbt files be named after the Item saved, possibly even minus spaces and non-alphanumeric characters (e.g a shulker box called [ C0DO Kit] would be saved as C0DOKit.nbt)
  • Make .nbt files be named based off an argument provided, e.g /nbt export file C0DOKit would be saved as C0DOKit.nbt

If both were added, then it would default to item name if no arguments are given.

I look forward to seeing this added :)

commented

I've just released v1.11.0, which adds this! When no arguments are added, the exported file is the item name followed by the timestamp. When there is an additional argument, the file name is set to it without any timestamp.
The exported files use the same system as world names, so the same characters will be filtered out and duplicate file names will be handled in the same way.
To go along with this upgrade, I've also added [Open Folder] and [Delete] buttons to the export message and screenshot message.

commented

This is amazing!! Thank you so much for adding this (and adding it full featured) :)