- Fixed bug with removing items from a list
- New Syntax & Features
Change YAML ID or File Path
You can now change the ID of a loaded YAML file or reassign its file path at runtime!
Syntax:
`(change|rename|update) y[a]ml id [from] %string% to %string%`
`(change|rename|update) y[a]ml %string% file path to [(1¦non[(-| )]relative)] %string%`
Use cases:
- Rename YAML IDs safely (be careful: other scripts using the old ID will not see the change and you will need to make sure you are using the new ID after).
- Recover or move YAMLs that were deleted from disk but are still in memory.
Check if YAML is Modified (Unsaved)
New condition to check if a YAML file has unsaved changes since last load/save.
`y[a]ml %string% is (modified|unsaved)`
`y[a]ml %string% is not (modified|unsaved)`
Use cases:
- Auto-save only when there are changes.
- Warn users before shutdown or reload if data would be lost.
Enhanced Save YAML Syntax
Save to a different file path
`save y[a]ml %strings% (to|as) [(1¦non[(-| )]relative)] [file] %string% [with an indentation of %-number%] [(2¦[and] with(out| no) extra lines between nodes)]`
- If the YAML file was deleted from disk but is still in memory, you can now save it to a new location and continue working with it.
The effect restores the original file path after saving to a different location, unless the file was deleted and the save succeeded (in which case the new path is kept).
**Full Changelog**:
https://github.com/Sashie/skript-yaml/compare/v1.7.1...v1.7.2