Add max health guard for players.

This commit is contained in:
garbagemule
2014-07-11 00:17:30 -04:00
parent 5dc35728c1
commit 460cec0fb8
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -1041,7 +1041,8 @@ public class ArenaImpl implements Arena
PlayerData mp = playerData.remove(p);
// Health must be handled in a certain way because of Heroes
setHealth(p, mp.health());
// Math.min to guard for ItemLoreStats weirdness
setHealth(p, Math.min(p.getMaxHealth(), mp.health()));
// Put out fire.
Delays.douse(plugin, p, 3);