Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. final URLConnection connection = new URL(Settings.API_URL + "?user=" + uuid.toString().replace("-", "")).openConnection();
  2. connection.addRequestProperty("User-Agent", "Mozilla/4.0");
  3. final JSONTokener tokener = new JSONTokener(connection.getInputStream());
  4. final JSONObject root = new JSONObject(tokener);
  5. return root.getJSONObject(uuid.toString().replace("-", "")).getString("username");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement