3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

SPIGOT-5836: PotionEffect HEALTH_BOOST never expires

Dieser Commit ist enthalten in:
md_5 2020-06-26 19:13:33 +10:00
Ursprung c99846cc76
Commit 4ff609e60c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: E8E901AC7C617C11

Datei anzeigen

@ -1526,10 +1526,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
for (AttributeModifiable genericInstance : collection) {
if (genericInstance.getAttribute() == GenericAttributes.MAX_HEALTH) {
genericInstance.setValue(scaledHealth ? healthScale : getMaxHealth());
collection.remove(genericInstance);
break;
}
}
AttributeModifiable dummy = new AttributeModifiable(GenericAttributes.MAX_HEALTH, (attribute) -> {});
dummy.setValue(scaledHealth ? healthScale : getMaxHealth());
collection.add(dummy);
}
@Override