Skip to content

skript-gson 1.4.0 (Loading file as given ID)

Compare
Choose a tag to compare
@cooffeeRequired cooffeeRequired released this 04 Dec 19:34
· 509 commits to main since this release

Skript-Gson 1.4.0 🔰

Git

  • Hello everyone 👋

  • demonstration of this version

on script load:
    load json file "gson/test.json" as "gson"
    set {-file} to "gson/test.json"

command saveloc [<string>]:
    trigger:
        append data (player's location) with key arg-1 to json file {-file}
        send "Location &8(&e%player's location%&e)&r saved in the json File."

command teleport:
    trigger:
        set {_} to element "test" from json (loaded json "gson")
        send "Teleporting player to Location &8'&etest&8'"
        teleport player to {_}

Json

{
  "test": { 
    "==": "org.bukkit.Location",
    "world": "world",
    "x": -229.0386861464188, 
    "y": 70.0,
    "z": 76.05075919038354,
    "pitch": 13.199765, 
    "yaw": 308.98376
  }
}

image
image

Addon

  • Added: CondJsonLoaded.class
"json %jsonelement% is loaded",
"json %jsonelement% is(n't| not) loaded"
  • Added: EffLoadJsonFile.class
"load json file %object% as %object%"
  • Added: ExprAllLoadedJsons.class
"(all|(:only) %-integer%) loaded json"
  • Added: ExprGetJsonElement.class
element %string% from [json] %jsonelement%
  • Added: ExprLoadedJson.class
loaded json [id] %object%
  • ♾️ Sanitized: All syntaxes..

Thank you all for your attention.
Sincerely Coffee. 👋

FTW skript-gson

Full Changelog: https://github.com/cooffeeRequired/skript-gson/compare/1.3.3..1.4.0