1. 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 comminuty!

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

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

skript-storage: Whole new way to store data!

Discussion in 'Addon Releases' started by SkyCraft78, Nov 15, 2021.

  1. SkyCraft78

    SkyCraft78 New Member

    May 18, 2019
    Likes Received:
    skript-storage was made to handle the most used file-storage system and use them easily with Skript. In addition to YAML, you can also manage JSON and TOML files as you like, since all of them have multiple advantages and disadvantages.

    File Types Storage
    skript-storage allow three main file storage type:

    • YAML (valid extension: .yml)
    • JSON (valid extension: .json)
    • TOML (valid extension: .toml)

    All of them have different advantages and disadvantages which will allow using one or the other for this or that type of storage.

    Cross-version Data

    skript-storage supports all of these three types, and the best part is that you don’t have to change anything in your code! Every node will be represented in the same way and every expression will be supported with these types.

    Only headers comments will be available for YAML and not for JSON neither TOML.

    skript-storage determine the file type with its extension (see the second part), and you cannot make a file with another extension (skript-storage will be unable to parse it)


    Code (Text):
    1. create shortcut for "plugins/Test/config.yml" as "config"
    4. set value "First.Second" from "config" to "Hello World!"
    5. set value "First.Third.Fourth" from "config" to 50
    6. set value "First.Lastly" from "config" to 30
    7. set value "SecondMain" from "config" to "Welcome!"
    9. set value "Node.Path" from "config" to red # Color
    10. set value "Node.Path" from "config" to now # Date
    11. set value "Node.Path" from "config" to 20 minutes # Timespan
  2. Florenthz

    Florenthz Member

    Dec 5, 2017
    Likes Received:
    Hi bro, how did you open the thread?
  3. LimeGlass

    VIP Supporter ++ Regular Diner Addon Developer

    Jan 24, 2017
    Likes Received:
    YAML, JSON and TOML aren't considered storage, they're markup languages, all to be used for configurations, but only JSON can be used to structure data. So it's not really a storage addon.

Share This Page