Fix scaling of player health bar
This commit is contained in:
parent
505e6b3b90
commit
3650dc7d2a
2 changed files with 7 additions and 6 deletions
|
|
@ -631,8 +631,9 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
|||
}
|
||||
@Override
|
||||
public double getHealth() {
|
||||
if(player != null)
|
||||
return helper.getHealth(player);
|
||||
if(player != null) {
|
||||
return Math.ceil(2.0 * player.getHealth() / player.getMaxHealth() * player.getHealthScale()) / 2.0;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue