9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-19 14:59:21 +00:00

docs: Attributes now hold max health

This commit is contained in:
William
2024-04-10 19:39:49 +01:00
parent 676ba7a10a
commit 0f1cc2d24f

View File

@@ -211,9 +211,9 @@ huskSyncAPI.getCurrentData(user).thenAccept(optionalSnapshot -> {
// Get the health data
Data.Health health = healthOptional.get();
double currentHealth = health.getCurrentHealth(); // Current health
double maxHealth = health.getMaxHealth(); // Max health
double healthScale = health.getHealthScale(); // Health scale (e.g., 20 for 20 hearts)
snapshot.setHealth(BukkitData.Health.from(20, 20, 20));
snapshot.setHealth(BukkitData.Health.from(20, 20));
// Need max health? Look at the Attributes data type.
// Get the game mode data
Data.GameMode gameMode = gameModeOptional.get();