mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +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());
|
||||
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.setHealth(data.getOldHealth() <= data.getOldMaxHealth() ? data.getOldHealth() : data.getOldMaxHealth());
|
||||
player.setFoodLevel(data.getOldFoodLevel());
|
||||
player.setGameMode(data.getOldGameMode());
|
||||
player.setFireTicks(data.getOldFireTicks());
|
||||
|
Loading…
Reference in New Issue
Block a user