Thats the class: http://pastebin.com/iAHuqKbt Here is an example on how to use it: Code:java UUIDParser u = new UUIDParser("FisheyLP");System.out.println("UUID: "+u.getUUID()); Output (UUID): Code: UUID: 5c0898f3-5ecc-4898-b284-1e44595bc764 And you do the same thing reverse! Code:java UUIDParser u = new UUIDParser(UUID.fromString("5c0898f3-5ecc-4898-b284-1e44595bc764"));System.out.println("Name: "+u.getName()); Output (String): Code: Name: FisheyLP And you can even get the last date where a player changed his name! Code:java UUIDParser u = new UUIDParser("FisheyLP");System.out.println("Last changed: "+u.getLastChanged()); Output (Date): Code: Last changed: Mon Feb 09 18:07:32 CET 2015 And it fixes case errors: Code:java UUIDPatcher u = new UUIDPatcher("fiSheYlP");System.out.println("Name: "+u.getName()); Output: Code: Name: FisheyLP I hope you like it
It'd be good to note that you can only do this once per minute per user; you can blame Mojang for that lol Just as a note, it's better to use a StringBuffer rather than doing "content + inputLine"
It is only more efficient to use a StringBuilder if you are doing more than one addition. "content" + "other content" creates one string builder to add the two, so writing out a string builder just for that is redundant and a waste of room. If you do "content" + "content 2" + ... + "content n" that is when you'd want to make a string builder, because there will be a new string builder for every single operation.
True; I usually write code that assumes you'll be handling large amounts of data rather than a single line like most Mojang profiles do.