mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
SPIGOT-5836: PotionEffect HEALTH_BOOST never expires
By: md_5 <git@md-5.net>
This commit is contained in:
parent
8144dfbd7f
commit
fcfcbd3975
@ -1526,10 +1526,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
}
|
}
|
||||||
for (AttributeModifiable genericInstance : collection) {
|
for (AttributeModifiable genericInstance : collection) {
|
||||||
if (genericInstance.getAttribute() == GenericAttributes.MAX_HEALTH) {
|
if (genericInstance.getAttribute() == GenericAttributes.MAX_HEALTH) {
|
||||||
genericInstance.setValue(scaledHealth ? healthScale : getMaxHealth());
|
collection.remove(genericInstance);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
AttributeModifiable dummy = new AttributeModifiable(GenericAttributes.MAX_HEALTH, (attribute) -> {});
|
||||||
|
dummy.setValue(scaledHealth ? healthScale : getMaxHealth());
|
||||||
|
collection.add(dummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user