Skip to content

Instantly share code, notes, and snippets.

@codebucketdev
Created July 5, 2014 13:02
Show Gist options
  • Save codebucketdev/311be7eb8fd0044ac085 to your computer and use it in GitHub Desktop.
Save codebucketdev/311be7eb8fd0044ac085 to your computer and use it in GitHub Desktop.
With this MojangRepository you can get a UUID from a Username and other way.
package de.codebucket.accounttool;
import java.util.UUID;
import de.codebucket.utils.NameFetcher;
import de.codebucket.utils.UUIDFetcher;
public class MojangRepository
{
public static String getUsername(UUID uuid) throws Exception
{
return NameFetcher.getRequest(uuid);
}
public static UUID getUniqueId(String username) throws Exception
{
return UUIDFetcher.getRequest(username);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment