forked from Upstream/mmocore
Added an extra death check to health regen.
This commit is contained in:
parent
d24e29705c
commit
11dcf97f9a
@ -382,7 +382,8 @@ public class PlayerData {
|
||||
}
|
||||
|
||||
public void heal(double heal) {
|
||||
getPlayer().setHealth(Math.min(player.getHealth() + heal, player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
|
||||
double healAmount = Math.min(player.getHealth() + heal, player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
|
||||
if(healAmount > 0) getPlayer().setHealth(healAmount);
|
||||
}
|
||||
|
||||
public void addFriend(UUID uuid) {
|
||||
|
Loading…
Reference in New Issue
Block a user