Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function offline_player_from_uuid(uuid: string) :: offline player:
- replace all "-" with "" in {_uuid}
- set {_namesprofile} to text from "https://api.mojang.com/user/profiles/%{_uuid}%/names"
- set {_splits::*} to split {_namesprofile} by ","
- if size of {_splits::*} is 1:
- set {_number} to 1
- else if size of {_splits::*} >= 3:
- set {_number} to size of {_splits::*}-1
- replace """", "[", "]", "{" and "}" in {_splits::%{_number}%} with ""
- replace "name:" in {_splits::%{_number}%} with ""
- set {_player} to {_splits::%{_number}%} parsed as offline player
- return {_player}
- command /getplayertest <text>:
- trigger:
- send "%offline_player_from_uuid(arg)%"
Advertisement
Add Comment
Please, Sign In to add comment