skript-yaml by Sashie

YAML the way it should be

Events

0

Expressions

2

Effects

7

Conditions

4

Types

0

Sections

0

Structures

0

Total

13

Actual fix for yaml directory ids 1777 days, 11 hours and 54 minutes ago

This actually fixes things

View Update

Fix for yaml directory ids 1779 days, 11 hours and 13 minutes ago

just a small update

View Update

Added a few random things 1789 days, 12 hours and 57 minutes ago

Backwards compatibility and more, info at github page (https://github.com/Sashie/skript-yaml/releases/tag/v1.3)

View Update

1.13 support 1932 days, 22 hours and 7 minutes ago

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

View Update

More fixes 2139 days, 23 hours and 53 minutes ago

  • 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

View Update

v1.2.3 2157 days, 23 hours and 44 minutes ago

  • Fixed issue #6 before it was reported <3
    • 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


View Update

v1.2.2 2164 days, 17 hours and 36 minutes ago

Bugfixes

  • Added Skripts ItemType and Slot class to the yaml representer
    • This fixes certain items not being saved as ItemStack

  • Fixed stacktrace when saving empty yaml
  • Updated the Yaml expression to filter color codes back and forth
    • Use the 'without string checks' option to disable it

View Update

Bugfixes and more 2176 days, 8 hours and 12 minutes ago

Bugfixes and more

  • 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)
  • Changed 'Yaml' expression to [[skript-]y[a]ml] (1¦value|2¦(node|path) list|3¦(node|path)[s with] keys|4¦list) %string% (of|in|from) %string% [without string checks]
    • Using '(node|path) list' only gets a list of nodes at that path (full names like 'rootnode.subnode' are returned)

  • Fixed comments and header not loading into memory during a fresh load (causing them to not be saved as a result)
  • Snakeyaml loads asynchronously already so i changed loading 'Effect' instead of 'AsyncEffect' (it fixes an error that happens sometimes)


Skript serialized classes now look like...

nodeName: !skriptclass
type: someclasstype
data: bGF3bHMgZ2V0IHJla3QgPDMgdGhpcyBpcyBvbmx5IGZvciBleGFtcGxl

View Update

More features 2220 days, 7 hours and 8 minutes ago


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"

View Update

Bug fix 2236 days, 9 hours and 11 minutes ago

Removed AsyncEffect from save effect due to issues

To reproduce said issue...


On script load:
load yaml "plugins/skript-yaml/test/test.yml" as "test"

command /test:
trigger:
loop 100 times:
set yaml value "node1.node2.node3" from "test" to 1
save yaml "test"

View Update

v1.1.5 2294 days, 11 hours and 19 minutes ago

Added a couple more things to make the addon more feature complete

  • Added effect delete [y[a]ml] %string% (deletes the file and removes it from memory)
  • Added condition [skript-]y[a]ml %string% is[(n't| not)] empty (only checks if there are any nodes)

View Update

v1.1.4 2298 days, 9 hours and 32 minutes ago

Workaround for Async issue

View Update

Bug fixes 2339 days, 19 hours and 52 minutes ago

  • Fixed a bug with 'skriptclass' values from root nodes not returning properly
  • Fixed a bug with getting names of nodes

Thanks @Simuciokas for spotting those!

View Update

Root directory support 2351 days, 14 hours and 26 minutes ago

Root directories

  • Added root directory support
  • Updated Load yaml syntax to [re]load [non[(-| )]relative] [y[a]ml] %string% [as %-string%]

Usage:

#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"

View Update

Bug fixes 2352 days, 21 hours and 53 minutes ago

Fixed lots of bugs in this version!
(Added Skripts serializer)

  • Existing files didn't weren't being loaded(oops) and other various things related to this.
  • Headers require # for the first character if you don't use one then ## will be used by default
  • All nodes expression now only returns nodes that contain values
  • Classes such as Location, Vector or any Skript class weren't being saved properly
  • yaml node keys weren't working properly
  • added null checks to get methods

View Update

Comment away 2357 days, 6 hours and 29 minutes ago

  • Removed Yaml exists condition(it was useless) in favor of Skripts built in condition(still need to test it :3)
  • Added Node has value condition
  • Added comments and header expression
  • Switched to the same YAML processor that world edit uses since it has comment and header support already


(check github for docs)

View Update

Adding jar to forums 2366 days, 18 hours and 15 minutes ago

testing a thing

View Update

skript-yaml 2367 days, 3 hours and 50 minutes ago

skript-yaml


The proper way to do yaml in skript

Rather then checking the file each time this addon caches the yaml file to memory
It also includes comment/header support which is not found in the other yaml addons


Source code available at github


[h2]Skripts[/h2]

  • ez-yaml.sk
    - Updated version thanks to @Pikachu of this Skript API

    createYMLFile("plugins/MyAwesomePlugin/boop.yml", "list: listName:50;3.14;true;false;yes;no;on;off||value: valueName1:true||value: valueName2:2||value: valueName3:2.6||value: valueName4:This is a string")

  • yaml-tests.sk
    - Same as above test made by @Rezz converted to skript-yaml by @Pikachu


[h2]Thanks![/h2]
I'd like to thank the whole Skript community, without users like you I wouldn't have bothered to make this!

A special shout out goes to @Pikachu for helping me with the syntax and some ideas <3

View Update

© Copyright 2014-2024 skUnity

All rights reserved.