skript-yaml

Addon skript-yaml v1.7.2

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

- 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
Fixed some bugs from the last release!
  • yaml loop expression wasn't working after the recent pull request ie. loop-node, loop-id, loop-val
  • loading bukkit serializable objects causing a casting error because they wanted a string as input
Added the option to keep yaml in memory after deleting the file
  • delete y[a]ml %strings% [and keep loaded in memory]
Cleaned up and updated some backend logic to all effects, expressions and conditions to help things run better in an async environment
Full Changelog: v1.7.0...v1.7.1
skript-yaml v1.7.0
https://github.com/Sashie/skript-yaml/releases/tag/v1.7.0
  • Refactor: Loop YAML Expression Support by @cooffeeRequired in #68
  • Updated all syntax to require "y[a]ml" to fix syntax conficts with Skript
  • Updated to Skript 2.12.0 while remaining backwards compatible
  • Fixed casting error for time related yaml #64
  • Updated yaml loop removing loop-iteration for Skript 2.8 and above as it has been added to Skript (issue posted on discord)
Sorry I skipped a couple updates on this site however all releases are at the github


  • Updated for Skript 2.10.0
  • Added an Update Checker thanks to @EquipableMC from pull request #63
Backwards compatibility and more, info at github page (https://github.com/Sashie/skript-yaml/releases/tag/v1.3)
  • Like
Reactions: Uzumaki
1.13 support

  • Fixed issue with stuff not saving properly due to 'NoSuchMethod' error
**EDIT**: At the moment this version doesn't work with some older versions of spigot(1.8 etc.), you can safely use 1.2.4 if you get a 'NoSuchMethod' error
  • Fixed issue with files not loading if some keys contained integers
    • They now get converted into characters, keep this in mind when fetching data from those nodes
  • Fixed issue with elements not saving in the same order they were set
  • Fixed error when loading a file with empty nodes
  • Fixed a casting issue with lists
  • Like
Reactions: AlvianMinecraft