- Added list value expression `[[skript-]y[a]ml] value %number% (of|in|from) list %string% (of|in|from) %string% [without string checks]`
- Warns if the node is not a list or if the index is not within range
- Added more verbose error logging
- Internal errors now show the sk file and line number also there are more error/warning messages for certain things
- Bug fixes
- Sometimes strings would split between multiple lines (which snakeyaml does by default) causing data to sometimes be lost
- Fixed by preventing strings from splitting
- Sometimes strings containing '&' would save without double quotes and cause an error preventing the data from loading correctly
- Fixed by forcing those strings to save with double quotes (currently )
- Fixed some NPEs laying around the place
- Skript versions
- In Skript 2.4 some api changes were made to some class names and methods and again in Skript 2.6 some other changes were made
- This update addresses those changes and makes things backwards compatible
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
Moved serialization method to better location to address an issue where certain serialization didn't happen if the file was loaded and saved again(without setting the value)
Added more skript classes to the representer
Date, Time, Timespan, Color and WeatherType
Date is parsed the same way snakeyaml would have converted 'java.util.Date'
The rest use skript methods to convert back and forth
Updated how de/serialization works using Snakeyamls built in methods
This means you will see a change in how Skript serialized classes look removing the map node 'skriptclass' to a tag '!skriptclass' that Snakeyaml uses to parse data types
Vector and Location also have a tag and removal of the map node representing the data type
Bukkits ConfigurationSerializable data types are also de/serializable using the same method bukkit feeds to snakeyaml
These types have their own serialized structure
It will update any previously saved data types
Added Effect to delete all yaml or any loaded yaml from a directory
'delete all [y[a]ml] from [(1¦non[(-| )]relative)] director(y|ies) %strings%'
'delete (all|any) loaded [y[a]ml] from [(1¦non[(-| )]relative)] director(y|ies) %strings% [using [the] filename as [the] id]'
Re-added 'Does yaml path exist' condition since the built in skript version was returning the wrong result (check docs for more info)
Added even more things to make the addon more feature complete
- Added effect `[re]load all [y[a]ml] from [(1¦non[(-| )]relative)] director(y|ies) %strings% [using [the] filename as [the] id]` (loads all .yml from a directory thx pikachu for the idea)
- Files are now saved with additional lines between each node
- Updated 'Save yaml' effect to...
- `save [y[a]ml] %string% [(1¦without extra lines between nodes)]`
- Comments and header no longer add additional lines by default
- Updated 'Yaml comment/header' expressions to...
- `[the] comment[s] (of|from) [y[a]ml] node[s] %strings% (of|in|from) %string% [(1¦with [an] extra line)]`
- `[the] (comment[s] (at|on) [the] top of |header (of|from)) %string% [(1¦with [an] extra line)]`
- Updated 'Yaml' expression return type now stuff like this works...
- broadcast yaml value "location" from "plugins/skript-yaml/teleport.yml"
- teleport player to yaml value "location" from "plugins/skript-yaml/teleport.yml"
#If the server is on drive D:\(on windows) for example then that would be the root path
load non-relative yaml "RootFolder/MyAwesomePlugin/config.yml"
#Otherwise you can specify a drive
load non-relative yaml "C:/RootFolder/MyAwesomePlugin/config.yml"