//Convert UUIDs into resulting pair $UUIDLeast = htmlspecialchars($_GET['uuidleast']); $UUIDMost = htmlspecialchars($_GET['uuidmost']); $UUID = htmlspecialchars($_GET['uuid']); $convert = htmlspecialchars($_GET['convert']); $l = dechex($UUIDLeast); $m = dechex($UUIDMost); while (strlen($l) < 16){ $l = 0 . $l; } while (strlen($m) < 16){ $m = 0 . $m; } $lm = $m . $l; $lmResult = substr_replace($lm, "-", 8, 0); $lmResult = substr_replace($lmResult, "-", 13, 0); $lmResult = substr_replace($lmResult, "-", 18, 0); $lmResult = substr_replace($lmResult, "-", 23, 0); if($convert == "dechex"){$inGame['testfor'] = "/testfor ".$lmResult;} //Convert UUID pair into resulting Least and Most function addZero($target, $max){ while(strlen($target) < $max){ $target = "0".$target; } return $target; } $UUID3 = explode("-", $UUID); $UUID2 = str_replace("-", "", $UUID); $UUIDLeast2 = addZero($UUID3[3], 4).addZero($UUID3[4], 12); $UUIDMost2 = addZero($UUID3[0], 8).addZero($UUID3[1], 4).addZero($UUID3[2], 4); $UUIDLeastResult = number_format(hexdec($UUIDLeast2), 0, "", ""); $UUIDMostResult = number_format(hexdec($UUIDMost2), 0, "", ""); if($convert == "hexdec"){$inGame['dataTags'] = "UUIDLeast:".$UUIDLeastResult."l,UUIDMost:".$UUIDMostResult."l";} echo ""; ?>