akon1248

Untitled

Feb 27th, 2019
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. function offline_player_from_uuid(uuid: string) :: offline player:
  2. replace all "-" with "" in {_uuid}
  3. set {_namesprofile} to text from "https://api.mojang.com/user/profiles/%{_uuid}%/names"
  4. set {_splits::*} to split {_namesprofile} by ","
  5. if size of {_splits::*} is 1:
  6. set {_number} to 1
  7. else if size of {_splits::*} >= 3:
  8. set {_number} to size of {_splits::*}-1
  9. replace """", "[", "]", "{" and "}" in {_splits::%{_number}%} with ""
  10. replace "name:" in {_splits::%{_number}%} with ""
  11. set {_player} to {_splits::%{_number}%} parsed as offline player
  12. return {_player}
  13. command /getplayertest <text>:
  14. trigger:
  15. send "%offline_player_from_uuid(arg)%"
Advertisement
Add Comment
Please, Sign In to add comment