command /skin [<offline player>]:
trigger:
if arg-1 is set:
send request to "https://api.mineskin.org/generate/user/%arg-1's uuid%"
set {_res} to response
map json body of {_res} to {_json::*}
set {_value} to {_json::data::texture::value}
set {_signature} to {_json::data::texture::signature}
# set {_skin} to skin with value {_value} signature {_signature}
set {_skin} to new player skin with value {_value} signature {_signature}
set player's displayed player skin to {_skin}
else:
send request to "https://api.mineskin.org/generate/user/%player's uuid%"
set {_res} to response
map json body of {_res} to {_json::*}
set {_value} to {_json::data::texture::value}
set {_signature} to {_json::data::texture::signature}
set {_skin} to new player skin with value {_value} signature {_signature}
set player's displayed player skin to {_skin}