Created
April 10, 2018 19:21
-
-
Save brecert/ea4badce0046518d85d77956647b4108 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$${ | |
&user = PROMPT(&return,"$$u","Select Player",true) | |
//log(The user inputted is %&user%) | |
&prefix = &3[&bUUID Search&3] | |
IF(%&user% = "") | |
LOG("%&prefix% &cNo user selected.") | |
STOP() | |
ENDIF() | |
&response = HTTPGET("https://api.mojang.com/users/profiles/minecraft/%&user%?at=%TIMESTAMP%","","") | |
//log("The response is %&response%") | |
&user="" | |
&rawarray[] = SPLIT(",",%&response%) | |
// log("The rawarray is %&rawarray%") | |
MATCH(%&rawarray[0]%,\"id\":\"([a-z|0-9]+)\",{&uuid}) | |
&responsenames = HTTPGET("https://api.mojang.com/user/profiles/%&uuid%/names","","") | |
&namesarray[] = SPLIT("},{",%&responsenames%) | |
ARRAYSIZE(&namesarray,#size) | |
#sizeabsolute = ((%#size%) - 1) | |
MATCH(%&namesarray[0]%,^\[?\{\"name\":\"(.*)\",{&originalname}) | |
LOG("%&prefix% &6Original name: &a%&originalname%") | |
LOG("%&prefix% &6Name changed %#sizeabsolute% times.") | |
IF(#size > 1) | |
MATCH(%&namesarray[%#sizeabsolute%]%,^\[?\{?\"name\":\"(.*)\"\,\"changedToAt\":\d+\}\]$,{¤tname}) | |
LOG("%&prefix% &6Current name: &a%¤tname%") | |
LOG("%&prefix% &8------------------------") | |
&previousname = %&originalname% | |
FOR(#for,1,%#sizeabsolute%) | |
MATCH(%&namesarray[%#for%]%,^\[?\{?\"name\":\"(.*)\"\,\"changedToAt\":\d+\}?\]?$,{&changedname}) | |
LOG("%&prefix% &a%&previousname% &6to &a%&changedname%") | |
&previousname = %&changedname% | |
NEXT | |
LOG("%&prefix% &8------------------------") | |
ENDIF | |
}$$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment