mojira.dev

FearThe1337

Assigned

No issues.

Reported

No issues.

Comments

Using the latest api (Which I was already using) the name still returns 2 different uuids for this user if the lookup has more then 1 name specified.

String[] names = new String[] {"Notch","milo00" };

HttpProfileRepository rep = new HttpProfileRepository("minecraft");
Profile[] profiles = rep.findProfilesByNames(names);

for (Profile profile : profiles) {
	System.out.println(profile.getName() + ":" + profile.getId());
}

outputs

Milo00:7e3fcc4b0f1a4c04a7f4987fa7f65185
Notch:069a79f444e94726a5befca90e38aaf5
milo00:175d2f30a0f0485e8ebc46c81ea1af5c

Same for the php code I was using

<?php
	function uuidArray($usernames){
		$json = json_encode($usernames);
		
		$ch = curl_init();
		$curlConfig = array(
			CURLOPT_URL => "https://api.mojang.com/profiles/minecraft",
			CURLOPT_POST => true,
			CURLOPT_RETURNTRANSFER => true,
			CURLOPT_POSTFIELDS => $json,
			CURLOPT_HTTPHEADER => array(
				'Content-Type: application/json',
				'Content-Length: ' . strlen($json)
			),
		);
		
		curl_setopt_array($ch, $curlConfig);
		$json = curl_exec($ch);
		curl_close($ch);

		$response = json_decode($json);
		return $response;
	}
	
	$names = array();
	$names[] = 'milo00';
	$names[] = 'Notch';
	
	print_r(uuidArray($names));
?>

which yielded the output:

Array
(
[0] => stdClass Object
(
[id] => 7e3fcc4b0f1a4c04a7f4987fa7f65185
[name] => Milo00
)
[1] => stdClass Object
(
[id] => 069a79f444e94726a5befca90e38aaf5
[name] => Notch
)
[2] => stdClass Object
(
[id] => 175d2f30a0f0485e8ebc46c81ea1af5c
[name] => milo00
[legacy] => 1
[demo] => 1
)
)

While using the UUID lookup api for our player uptime tracking system I encountered a user who still has multiple uuids.
Apparently there is a uuid for 'milo00' and for 'Milo00'.
(Only difference is a different capitalization, but minecraft usernames are not case-sensitive?).
Assuming this bug has not been fully fixed yet?

Also, I seem to be having almost 200 names in my database who don't seem to have an uuid at all?