-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with writing quotes in json #90
Comments
Thank you, ill check it now |
Hello there. |
Hello! command /addtrade: But! you need an already existing json file { |
Thank you, can you provide also those itemns? or Skript what will generate those with the nbts? |
Sorry, I didn't understand a little you need to put items in the slots in the game |
just try inserting regular items and then using items with multiple enchantments and custom names |
i mean the items what containts the nbts. |
all items contain nbt, but the more information an item contains, such as enchantments or custom names, custom tags, the more nbt it contains "6": [ |
Thank you |
command /addtrade:
permission: OP
trigger:
set {_jt} to json from file "plugins/SkJson/test.json" # this is my json file
set {_slot0} to full nbt compound of slot 0 of player
set {_slot1} to full nbt compound of slot 1 of player
set {_slot2} to full nbt compound of slot 2 of player
set {_n} to 0
send {_jt} with pretty print to console
write {_jt} to json file "plugins/SkJson/trader.json"
loop values "trade::%{_n}%" of {_jt}:
send json-key to console
set value of json object "trade::0::%{_n}%::0::nbt" in {_jt} to {_slot0}
set value of json object "trade::0::%{_n}%::1::nbt" in {_jt} to {_slot1}
set value of json object "trade::0::%{_n}%::2::nbt" in {_jt} to {_slot2}
write {_jt} to json file "plugins/SkJson/trader.json" works perfectly fine |
I'm trying to save nbt in one line, but if nbt is too large, then get this (pic)
SkJson v3.0.3
Skript v2.8.2
SkBee v3.3.0
The text was updated successfully, but these errors were encountered: