Commits

md_5 authored 33071ecfffa
SPIGOT-2752: Fix resetMaxHealth
No tags

src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java

Modified
110 110 Validate.isTrue(amount > 0, "Max health must be greater than 0");
111 111
112 112 getHandle().getAttributeInstance(GenericAttributes.maxHealth).setValue(amount);
113 113
114 114 if (getHealth() > amount) {
115 115 setHealth(amount);
116 116 }
117 117 }
118 118
119 119 public void resetMaxHealth() {
120 - setMaxHealth(getHandle().getMaxHealth());
120 + setMaxHealth(getHandle().getAttributeInstance(GenericAttributes.maxHealth).getAttribute().b()); // PAIL: getDefault
121 121 }
122 122
123 123 public double getEyeHeight() {
124 124 return getHandle().getHeadHeight();
125 125 }
126 126
127 127 public double getEyeHeight(boolean ignoreSneaking) {
128 128 return getEyeHeight();
129 129 }
130 130

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut