Fixup adapting health when scaling

feat/data-edit-commands
William 1 year ago
parent 575122e6dd
commit b63e1bd283
No known key found for this signature in database

@ -808,10 +808,11 @@ public abstract class BukkitData implements Data {
@NotNull
public static BukkitData.Health adapt(@NotNull Player player) {
final double maxHealth = getMaxHealth(player);
return from(
player.getHealth(),
getMaxHealth(player),
player.getHealthScale()
Math.min(player.getHealth(), maxHealth),
maxHealth,
player.isHealthScaled() ? player.getHealthScale() : 0d
);
}

Loading…
Cancel
Save