Skip to content

Commit

Permalink
docs: Minor legacy API tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Sep 20, 2023
1 parent 496a55e commit 4d94a5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/API-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class HuskSyncAPIHook {
return;
}
// The User object has two fields; uuid and username.
System.out.println("User name is: " + optionalUser.get().username);
System.out.println("User name is: %s", optionalUser.get().username);
});
}

Expand Down Expand Up @@ -78,7 +78,7 @@ public class HuskSyncAPIHook {
Optional<StatusData> statusData = optionalUserData.get().getStatus();
// Print the health from the fields, if the user has a status object
statusData.ifPresent(status -> {
System.out.println(user.username + "'s health: " + status.health + "/" + status.maxHealth);
System.out.println("%s's health: %d/%d", user.username, status.health, status.maxHealth);
});
}
});
Expand Down Expand Up @@ -181,7 +181,7 @@ public class HuskSyncAPIHook {

// This returns a CompletableFuture<Void> that will invoke #thenRun() when it has completed
huskSyncAPI.setUserData(user, data).thenRun(() -> {
System.out.println("Healed " + user.username + "!");
System.out.println("Healed %s!", user.username);
});
}
});
Expand Down

0 comments on commit 4d94a5e

Please sign in to comment.