Fix resetting health in 1.8.8. Resolves #468

This commit is contained in:
Daniel Saukel 2018-10-04 23:02:13 +02:00
parent ddb955a8c1
commit ad22027b7e

View File

@ -350,8 +350,10 @@ public class DGlobalPlayer implements PlayerWrapper {
player.setExp(data.getOldExp());
if (is1_9) {
player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(data.getOldMaxHealth());
}
player.setHealth(data.getOldHealth() <= data.getOldMaxHealth() ? data.getOldHealth() : data.getOldMaxHealth());
} else {
player.setHealth(player.getMaxHealth());
}
player.setFoodLevel(data.getOldFoodLevel());
player.setGameMode(data.getOldGameMode());
player.setFireTicks(data.getOldFireTicks());