Skript 2.2-Fixes-V9b
SkQuery 3.21.4
SkUtilities 0.8.8
skRayFall 1.9.2
Minecraft 1.8.8 with ViaVersion up to 1.11.2
I'm trying to make a system where players can only change their nicknames a few times, with the ability to add the amount of times they can change it. I'd like to make a YAML file, with a command that adds the player's UUID and the amount of nicks they have left.
What I'd like is something like:
and so on and so forth. I can easily read YAMLs but I cannot figure out how to generate and write to them. So far I have
from my other large Skript that reads from a droptable, so I can salvage that code easily enough. I have no idea how I'm going to write to them, nothing works right.
Edit: Now I have the ability to write to a YAML, but the YAML generated is as follows:
Is there a way to change this so it's like this:
SkQuery 3.21.4
SkUtilities 0.8.8
skRayFall 1.9.2
Minecraft 1.8.8 with ViaVersion up to 1.11.2
I'm trying to make a system where players can only change their nicknames a few times, with the ability to add the amount of times they can change it. I'd like to make a YAML file, with a command that adds the player's UUID and the amount of nicks they have left.
What I'd like is something like:
Code:
players:
uuid:
- 1
uuid:
- 3
uuid:
- 5
Code:
set {_guns::common::*} to yml list "guns.common" of file "plugins/Skript/Cryptarch/droptable.yml"
Code:
command /addnick <player>:
permission: destiny.nickname.add
trigger:
set {_uuid} to player's UUID
set {_1} to 1
message "%{_uuid}%"
if yaml value "player.%arg 1%" of file "/plugins/Destiny/test.yml" exists:
send "Player already exists! Adding use!" to the console
add "%{_1}%" to yaml list "player.%arg 1%.use" of file "/plugins/Destiny/test.yml"
set {_uses::*} to yaml list "player.%arg 1%.use" of file "/plugins/Destiny/test.yml"
message "%{_uses::*}%"
Code:
player:
infered5:
use:
- '1'
- '1'
- '1'
Code:
player:
infered5:
use:
- '3'
Last edited: