Skip to content

Commit 5c2f482

Browse files
committed
made namemc command not use uuids in the url
1 parent b44f0aa commit 5c2f482

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/main/java/net/wurstclient/commands/NameMCCmd.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,19 @@ public void call(String[] args) throws CmdException
4242

4343
try
4444
{
45-
final String uuid = fetchMojang(target);
45+
// try getting the uuid just to make sure the user exists (not a
46+
// nick)
47+
fetchUUIDFromMojang(target);
4648

4749
ChatUtils.message("Opening profile in the browser...");
48-
49-
String link = "https://namemc.com/profile/" + uuid;
50-
Util.getOperatingSystem().open(link);
51-
50+
Util.getOperatingSystem().open("https://namemc.com/" + target);
5251
}catch(Exception e)
5352
{
5453
throw new CmdError("Failed to fetch profile");
5554
}
5655
}
5756

58-
private String fetchMojang(String name) throws Exception
57+
private String fetchUUIDFromMojang(String name) throws Exception
5958
{
6059
URL url = URI.create(mojangAPI + name).toURL();
6160

0 commit comments

Comments
 (0)