Skip to content
This repository was archived by the owner on Jan 27, 2024. It is now read-only.

Commit

Permalink
Name history is no longer available
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed Oct 9, 2022
1 parent 4276f45 commit e37da6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 5 additions & 0 deletions src/main/java/commands/NameHistoryCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public void process(@NotNull CommandEvent event, @NotNull String[] args) {
return;
}

if (true) {
event.reply("Name history for a player is no longer available publicly. See https://help.minecraft.net/hc/en-us/articles/8969841895693.");
return;
}

String playerName = args[1];
UUID uuid;
if (UUID.isUUID(playerName)) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/heartbeat/HeartBeat.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public HeartBeat(Bot bot) {
addTask(new GuildTracker(bot));
addTask(new GuildLeaderboardTracker(bot));
addTask(new TrackingManager(bot));
addTask(new PlayerUUIDRetriever(bot));
// Player name history is not retrievable anymore: https://help.minecraft.net/hc/en-us/articles/8969841895693
// addTask(new PlayerUUIDRetriever(bot));
}

private void addTask(TaskBase task) {
Expand Down
9 changes: 0 additions & 9 deletions src/test/java/api/TestMojangApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,4 @@ void testUUIDAtTime() {
assert uuid != null;
assert uuid.toStringWithHyphens().equals("db9b5cad-5785-48d3-be91-18a9876ec00e");
}

@Test
void testNameHistory() {
MojangApi api = getApi();
NameHistory history = api.mustGetNameHistory(new UUID("1d378fba-e8d2-44bc-b731-db5d42dfc791"));
assert history != null;
assert history.getNameAt(1000L).equals("GOden02");
assert history.getNameAt(1457572526000L).equals("MidnightGoden");
}
}

0 comments on commit e37da6c

Please sign in to comment.