mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-12-01 06:53:26 +01:00
Fix resetting health in 1.8.8. Resolves #468
This commit is contained in:
parent
ddb955a8c1
commit
ad22027b7e
@ -350,8 +350,10 @@ public class DGlobalPlayer implements PlayerWrapper {
|
|||||||
player.setExp(data.getOldExp());
|
player.setExp(data.getOldExp());
|
||||||
if (is1_9) {
|
if (is1_9) {
|
||||||
player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(data.getOldMaxHealth());
|
player.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(data.getOldMaxHealth());
|
||||||
}
|
|
||||||
player.setHealth(data.getOldHealth() <= data.getOldMaxHealth() ? data.getOldHealth() : data.getOldMaxHealth());
|
player.setHealth(data.getOldHealth() <= data.getOldMaxHealth() ? data.getOldHealth() : data.getOldMaxHealth());
|
||||||
|
} else {
|
||||||
|
player.setHealth(player.getMaxHealth());
|
||||||
|
}
|
||||||
player.setFoodLevel(data.getOldFoodLevel());
|
player.setFoodLevel(data.getOldFoodLevel());
|
||||||
player.setGameMode(data.getOldGameMode());
|
player.setGameMode(data.getOldGameMode());
|
||||||
player.setFireTicks(data.getOldFireTicks());
|
player.setFireTicks(data.getOldFireTicks());
|
||||||
|
Loading…
Reference in New Issue
Block a user