mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-28 02:59:13 +00:00
Fixup adapting health when scaling
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user