Yaml (Expression) — skript-yaml

Addon: skript-yaml · Category: Expression · Since: 1.0.0

Syntax

[skript-]y[a]ml (value|(node|path) list|(node|path)[s with] key[s]|list) %string% (of|in|from) %string% [without string checks]

Description

Gets, sets, removes values/nodes etc.. of a cached yaml file - Requires the id used/created from the load effect - This expression does not save to file - Lists accept list variables for input - Using 'without string checks' optional is a tiny bit faster but doesn't check/convert strings for numbers or booleans

Examples

set yaml value "test1.test2" from "config" to "test3" # sets the node "test1.test2" to the string "test3"
set yaml list "list.name" from "config" to {_list::*}
 
set {_test} to yaml value "test1.test2" from "config"
broadcast "%{_test}%"
 
# To delete a value you can use either of these two syntax
delete yaml value "test1.test2" in "uniqueID"
remove "test2" from yaml node key "test1" in "uniqueID"

View source